Agile Performance Testing - Testing Experience
Agile Performance Testing - Testing Experience
Agile Performance Testing - Testing Experience
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
(2) After completing the selection of feature model variabilities,<br />
the engineer requests the derivation of this new instance.<br />
The GenArch derivation tool will check the entire architecture<br />
model, individually processing its elements and verifying<br />
in the configuration model if the element is dependent<br />
on one or more features. It will therefore create new instances<br />
only for the required elements, in accordance with what<br />
was requested in the feature model of the new instance.<br />
(3) Finally, the tool produces an Eclipse framework project as a<br />
result of the derivation<br />
process.<br />
This contains only<br />
those implementation<br />
elements<br />
that match the<br />
product first designed<br />
in the initial<br />
feature model<br />
configuration and<br />
specified by the<br />
application engineer.<br />
2.2.2 Generated script<br />
final customization<br />
Due to our project’s<br />
characteristics and<br />
constraints, which we<br />
will describe in the last<br />
section of this article,<br />
we decided to organize<br />
the project using the<br />
GenArch derivation<br />
tool, in order to ensure<br />
that the generated<br />
Eclipse project could<br />
contain the test script<br />
specified according to<br />
the variabilities and its<br />
values set in step (I).<br />
However, we still need<br />
to go through the sixth<br />
and last step of our approach,<br />
where the generated test scripts will receive final customizations<br />
and adjustments in order to enable correct execution<br />
using the performance test tool JMeter. In this section, we<br />
will describe the necessary steps to ensure a perfect coupling and<br />
execution of the generated test scripts.<br />
(I) Initially, the .jmx (JMeter test scripts standard extension) file<br />
available inside the Eclipse project, which is generated by<br />
GenArch during new instance derivation, must be loaded<br />
into JMeter.<br />
(II) Next, JMeter is used to capture all information provided by<br />
the browser, with the intent of capturing transactions (operations)<br />
that could not be represented in GenArch models,<br />
but which are still part of the test script.<br />
(III) The captured JMeter data must be inserted into the correct<br />
execution position within the generated test script. All extra<br />
information needed, like customized variables, need to be<br />
manually configured in the added transactions, in order to<br />
ensure that the items previously configured using GenArch<br />
can be correctly accessed;<br />
(IV) Next, test script needs to be run for the first time, in order<br />
to ensure that it works as designed. If it doesn’t, we need to<br />
make the necessary adjustments and corrections;<br />
(V) At last, we have the final test script, which consists of all the<br />
information generated by GenArch and JMeter’s recorded<br />
transactions data which have been added. This will finally be<br />
available for test execution as planned by the test team.<br />
3. Deriving a performance test script example<br />
Figure 4 below shows a feature model created for deriving performance<br />
test scripts as described in the previous sections. The picture<br />
shows how the GenArch derivation tool shows the selection<br />
of a new test instance, in which we can define the features we<br />
want to include for the new test script together with its respective<br />
values.<br />
Figure 4 – Configuration of a new test instance<br />
For example, the value of the Number of Users element has been<br />
set to 100 (one hundred) and can easily be modified by double<br />
clicking on it. We can also see that the selections of elements like<br />
Search and View Results in Graph and several features have automatically<br />
been eliminated due to restrictions previously defined.<br />
The selection determines the template customization with JMeter<br />
elements (code), which are related to the features selected.<br />
In our example the selection shown has produced the test script<br />
displayed in the picture below, which was produced with the intent<br />
of validating the response time of a search operation for a<br />
web search application.<br />
As we pointed out before,<br />
we had to perform<br />
some adjustments as a<br />
final step in order to include<br />
all desired features<br />
in the test script and to<br />
ensure its proper execution.<br />
To make the generated<br />
test script complete<br />
and ready for execution,<br />
missing transactions<br />
and operations were<br />
added producing the ini- Figure 5 – Derived Test Script<br />
56 The Magazine for Professional Testers www.testingexperience.com