Testing Web applications with the Eclipse Test
By: Lars Vogel
In addition to Eclipse itself in general TPTP needs two
components the Eclipse TPTP tools (plug-in) and the TPTP
agent controller. For simple web testing you only need the
2.2. Eclipse TPTP tools (plug-in)
Use the Eclipse update manager to install the Eclipse TPTP
tools (menu Help-> Software Updates -> find and install to
install the Performance Plug-in.
3. Create your first TPTP Test
TPTP needs a java project to store performance test as it
generates Java code.
Create a new Java project "TestPerformance". (see
Create your first Java program in Eclipse
Switch to the test perspective (menu: Window -> Open Perspective
-> Other and select "Test".
Create a HTTP recording test element by select your project,
right mouse click and select "Test Element". Select Recording ->
Click next. Select your project and give the text the name
"MyFirstWebTest.rec". Press finish.
If you receive the following error " Your browser
configuration setting for Automatic Configuration Script is
not supported. The Recorder only supports either no Proxy or
both HTTP and Secure Proxy." then uncheck the option 'use
automatic scripts' in the LAN settings of the internet
explorer. If you have problems with firefox switch to the
Internet Explorer as standard browser.
Your browser should get opened. Browse to your webpage, perform
your tasks and then close the browser. (in this example I just
read the website http://www.vogella.de). Close the browser then
your recordings will be saved.
Eclipse will now open the test editor. For example you can now
increase the number of users which will perform the test.
Right click on your test and select generate.
This will open the JUnit Test Code Generation Wizard. Select
your src folder and press Finish. This will generate the Java
test code (hidden in the Test perspective but visible in the
Run your test by selecting it, right mouse click and selection
Run As-> Test.
This will generate a file similar to the following
[Oct 21, 2007 9:13:21 AM Germany]". Double-click on the file to
see the results.
4. Generating a test report
You want a easy to understand report to view the results of the
Select your test, right click on it and select Report.
Select "HTML TestPassReport (BIRT)". Select Next and name your
report "PassTestReport1". Select to create your report in a new
folder report and name the report "myfirstreport". Press finish.
... to read more articles, visit http://sqa.fyicenter.com/art/