You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2019/05/02 04:27:16 UTC

[Bug 63394] New: JMeter should fail with non-zero if test plan cannot be opened

https://bz.apache.org/bugzilla/show_bug.cgi?id=63394

            Bug ID: 63394
           Summary: JMeter should fail with non-zero if test plan cannot
                    be opened
           Product: JMeter
           Version: 5.1.1
          Hardware: Macintosh
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: amerghazal@gmail.com
  Target Milestone: JMETER_5.1.1

nit: I'm on Mac OS X 10.14 but that wasn't available in your selection

problem: jmeter exits 0, e.g. success, despite not being able to open the test
plan. this results in pipeline jobs consuming the false positive and promoting
a revision under the presumption that load testing completed successfully

expected behavior: if test plan could not be opened, jmeter exits with non-zero

steps to reproduce:

```
% jmeter -n -t somefilenamethatisntatestplan.jmx ; echo $?
Could not open somefilenamethatisntatestplan.jmx
0
```

i've looked through the commandline options and cannot see a flag that would
allow it to run in a stricter fashion (e.g. failing non-zero on "could not
open"). please advise. many thanks!

/a

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63394] JMeter should fail with non-zero when test execution fails (due to missing test plan or other reason)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63394

--- Comment #6 from Konstantin Kalinin <ko...@kkalinin.pro> ---
Let me continue the discussion. The fix covers only "missing test plan" but not
"other reason" mentioned in the summary.

It would also be nice to have a non-zero exit code for the situation of CSV and
other data files unavailability that leads to test interruption.

E.g., I'm trying to read non-existent CSV using the CSV Data Set Config
element.

2020-02-28 11:35:46,665 INFO o.a.j.s.FileServer: Stored: 123.csv
2020-02-28 11:35:46,666 ERROR o.a.j.t.JMeterThread: Test failed!
java.lang.IllegalArgumentException: Could not read file header line for file
123.csv
        at
org.apache.jmeter.services.FileServer.reserveFile(FileServer.java:284)
~[ApacheJMeter_core.jar:5.2.1]
        at
org.apache.jmeter.config.CSVDataSet.iterationStart(CSVDataSet.java:189)
~[ApacheJMeter_components.jar:5.2.1]
        at
org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:399)
~[ApacheJMeter_core.jar:5.2.1]
        at
org.apache.jmeter.control.GenericController.fireIterEvents(GenericController.java:391)
~[ApacheJMeter_core.jar:5.2.1]
...
2020-02-28 11:35:46,752 INFO o.a.j.t.JMeterThread: Thread finished: Thread
Group 1-1
2020-02-28 11:35:46,754 INFO o.a.j.e.StandardJMeterEngine: Notifying test
listeners of end of test
...

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63394] JMeter should fail with non-zero if test plan cannot be opened

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63394

UbikLoadPack support <su...@ubikloadpack.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from UbikLoadPack support <su...@ubikloadpack.com> ---
Hello,
Just for information, we're working on a fix and will contribute a PR soon.

Regards

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63394] JMeter should fail with non-zero if test plan cannot be opened

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63394

--- Comment #2 from Felix Schumacher <fe...@internetallee.de> ---
Just saw that there is a PR 456 that could be used. I haven't seen UbikLoads
answer and worked on this, too. My solution was pretty similar to the PR except
that it used a ConfigurationException instead of a FileNotFoundException.

Are you working on a more complete solution than just checking for file
existance?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63394] JMeter should fail with non-zero when test execution fails (due to missing test plan or other reason)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63394

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Keywords|                            |FixedInTrunk
   Target Milestone|JMETER_5.1.1                |JMETER_5.2

--- Comment #5 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Author: pmouawad
Date: Tue May 21 08:32:36 2019
New Revision: 1859615

URL: http://svn.apache.org/viewvc?rev=1859615&view=rev
Log:
Bug 63394 - JMeter should fail with non-zero when test execution fails (due to
missing test plan or other reason)

Contributed by UbikLoadPack

This closes #458
This closes #456
Bugzilla Id: 63394

Added:
    jmeter/trunk/test/src/org/apache/jmeter/JMeterTest.java   (with props)
Modified:
    jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
    jmeter/trunk/xdocs/changes.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63394] JMeter should fail with non-zero when test execution fails (due to missing test plan or other reason)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63394

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|JMeter should fail with     |JMeter should fail with
                   |non-zero if test plan       |non-zero when test
                   |cannot be opened            |execution fails (due to
                   |                            |missing test plan or other
                   |                            |reason)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63394] JMeter should fail with non-zero if test plan cannot be opened

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63394

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to Felix Schumacher from comment #2)
> Just saw that there is a PR 456 that could be used. I haven't seen UbikLoads
> answer and worked on this, too. My solution was pretty similar to the PR
> except that it used a ConfigurationException instead of a
> FileNotFoundException.
> 
> Are you working on a more complete solution than just checking for file
> existance?

Hi Felix,

Yes we're working on a little more complete solution and will provide a test
case also.

Regards

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63394] JMeter should fail with non-zero if test plan cannot be opened

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63394

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello Felix,

PR:

https://github.com/apache/jmeter/pull/458


I let you review it and merge it as you'll have an external eye.

Thanks
Regards

-- 
You are receiving this mail because:
You are the assignee for the bug.