Вы находитесь на странице: 1из 5

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
Zvbl

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

Вам также может понравиться