The intention of the auto-generated JMX is to record what the file looks like for each version of JMeter. As such, the contents should be generated once. It should never be editted to fix a failing test. Rather, the cause should be investigated and the test adjusted if necessary.
To ensure upwards compatibility of JMX files, there needs to be a simple unit test that reads the JMX file. This should not fail with missing class etc; if it does then the upgrade.properties likely needs updating, not the test case or the JMX file. A more stringent test is to check whether the JMX file is strictly upwards compatible. This should be true for most version changes. i.e. if the file is read in and saved, the output should be the same. This is intended to catch bugs e.g. where a new variable has been added but the default value has not been specified. We don't want the JMX files to change unnecessarily between versions. The read/write unit tests obviously will fail where a test element has been dropped. Rather than editing the JMX file (which would invalidate the compatiility tests), there should be a modified copy of the original JMX file that excludes the removed test elements This will allow the rest of the test elements to be checked. However, this will get difficult to maintain for every downstream version, so only needs to be done for the next version i.e JMeter version N+1 should be able to read all prior versions without modification. And N+1 should be able to read/write version N unless an element has been dropped, in which case it should be able to read/write a copy of version N without the missing test elements. I think there probably needs to be a better naming convention for the JMX files so it's obvious which are which. On 27 November 2016 at 17:14, Philippe Mouawad <[email protected]> wrote: > Hello, > I create a special thread so that we have a reference thread for this > process as it is still not fully clear for me. > > I understand that we must whenever we change format in version N+1 , create > a GenTest_N.jmx by doing the following: > > > 1. ant generator_jar > 2. Run JMeter Gui > 3. Add a Thread Group > 4. Add the Test Generator to the WorkBench > 5. Run the Test Generator > 6. Save the JMX > > Felix made a recent change (within Bug 60222 > <https://bz.apache.org/bugzilla/show_bug.cgi?id=60222>) so that > TestSaveService uses SavedXXXX.jmx to make comparison between loaded file > by version N+1 and save version of this file by N+1. > > I have just made within Bug 60423 a change to format and unfortunately I > still have failures so I must be missing some step. > > Thanks for clarification. > -- > Regards. > Philippe
