Bug 59723 - Use jmeter.properties for testing whenever possible
Summary: Use jmeter.properties for testing whenever possible
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.0
Hardware: PC Mac OS X 10.1
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-19 21:39 UTC by Sebb
Modified: 2016-06-19 22:23 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2016-06-19 21:39:57 UTC
The unit tests generally use a separate version of jmeter.properties - testfiles/jmetertest.properties.

This was done originally to fix up some issues that applied only to tests.
However there is a problem with this, as changes to the standard properties may not be picked up in unit tests.

It would be better to rely on the standard default properties, and only override specific properties for tests if actually needed (e.g. logging level might need to be adjusted).

Similarly for batch tests; these use jmeter-batch.properties.
It would be better to use jmeter.properties and override as necessary using the -q command-line flag.
Comment 1 Sebb 2016-06-19 22:06:46 UTC
URL: http://svn.apache.org/viewvc?rev=1749211&view=rev
Log:
Use jmeter.properties for testing whenever possible
Fix unit tests
Bugzilla Id: 59723

Removed:
    jmeter/trunk/bin/testfiles/jmetertest.properties
Modified:
    jmeter/trunk/build.xml
    jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTestCase.java
    jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTestCaseJUnit3.java

URL: http://svn.apache.org/viewvc?rev=1749212&view=rev
Log:
Use jmeter.properties for testing whenever possible
Fix unit tests
Bugzilla Id: 59723

Modified:
    jmeter/trunk/xdocs/changes.xml
Comment 2 Sebb 2016-06-19 22:23:47 UTC
It's slightly tricky to fix the batch tests because these rely on the log file being empty. However only the initial property file is loaded before the settings are checked and logging started.

URL: http://svn.apache.org/viewvc?rev=1749218&view=rev
Log:
Use jmeter.properties for testing whenever possible
Fix batch tests
Bugzilla Id: 59723

Modified:
    jmeter/trunk/build.xml