Running Selenium Test Suite
Running
Selenium Test Suite for Regression
For this we need small software called ANT, it must be
installed and configured to my system(Till the time we have ant with eclipse,
now need to set ANT with my system)
Apache Ant ( Build Automation Tool)
Ant is an open
source tool for creating builds, it is used to automation repetitive task which
we do while creating build, like compiling source code, creating jars javadoc
etc.
Ant uses a xml
file for configuration.
This xml file contain Target,
Target means that action/steps need to be performed, it can
have multiple dependent/independent
targets for example if a Target A is dependent to Target be then Ant will
execute Target B before A.
We can also specify main Target. Main target means target
that will be execute per default this main target is dependent to other target
that Ant will execute other targets then
this main target.
Configure
ANT to my system
1à First Check Ant Exist in your system or Not ?
Go to command prompt
and write “ant –version”
è
If it display any version then OK otherwise we
need to configure ant to my system
Here it shows version, means I have ant in my system
2à If no version display means, you don’t have ant in
your system
è
Go to Eclipse Folder, inside it, we have plugins
folder, inside that we have apache ant folder
Go to inside bin folder and copy
this path
C:\Documents and
Settings\Administrator\Desktop\eclipse-java-helios-SR1-win32\eclipse\plugins\org.apache.ant_1.7.1.v20100518-1145\bin
3à We need to set this path in PATH environment
variable of my machine
Right Click on My Computerà PropertiesàAdvanced
à
Click on Environment Variable button à In System Variable à
go to PATH variable and Click on Edit
Go to Start if this variable value textbox and paste the bin
folder path we copies in step 2 and place semicolon(;)
Now press all OK buttons
4à Again Check Ant Exist in your system or Not ?
Go to command prompt
and write “ant –version”
Here it will display some version, so ANT is configured now
Execute Test Suite without Opening Eclipse
1à Copy the location where my project is
placed(location to the folder where build.xml exists)
C:\Documents and Settings\Administrator\workspace1\JavaTest1
2à Start Command prompt and move to that location
3à Now just write ant, it will start execution
Create
bat file for execution
Place all these command in a bat file
è
Open notepad
è
Write in first line : cd C:\Documents and
Settings\Administrator\workspace1\JavaTest1
è
In second line write : ant
Save it with any name with .bat
extension
Now whenever we want to execute our test suite, just click
on this bat file
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment