You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Philippe Mouawad <ph...@gmail.com> on 2016/11/27 17:14:29 UTC

How to update tests when jmx format changes

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

Re: How to update tests when jmx format changes

Posted by Philippe Mouawad <ph...@gmail.com>.
On Sun, Nov 27, 2016 at 7:13 PM, Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

> Am 27.11.2016 um 18:14 schrieb Philippe Mouawad:
>
>> 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.
>>
> The intention for the Saved... files was, that those represent the
> original files when saved with the current version. Whenever they don't
> match, we have to look at them and acknowledge every change. That way we
> are aware of the changes.
>

So do you generate the Save... file by loading it with current trunk
version of JMeter or do you do it differently ?
Thanks

>
> Felix
>
>
>> 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.
>>
>
>
>


-- 
Cordialement.
Philippe Mouawad.

Re: How to update tests when jmx format changes

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 27.11.2016 um 18:14 schrieb Philippe Mouawad:
> 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.
The intention for the Saved... files was, that those represent the 
original files when saved with the current version. Whenever they don't 
match, we have to look at them and acknowledge every change. That way we 
are aware of the changes.

Felix
>
> 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.



Re: How to update tests when jmx format changes

Posted by sebb <se...@gmail.com>.
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
<ph...@gmail.com> 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