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
Hello, Just for information, we're working on a fix and will contribute a PR soon. Regards
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?
(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
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
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
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 ...
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5057