if you have downloaded "apache-ant-1.9.7" in to your local machine then system variable should look like
[attachment=0:mlv7x3vx]apache.png[/attachment:mlv7x3vx]
if system variable is configured properly, then you should follow below steps
Step1:
C:\Users\admin>"mention drive in which workspace/project is created" (for e.g. if it is created in "d" drive, then it should be C:\Users\admin>d:)
Step2:
D:\> cd "Project path" (for e.g. D:\> cd D:\Downloads_copy\workspace\Module8_Junitframework)
Step3:
D:\Downloads_copy\workspace\Module8_Junitframework\ant
As suggested, I downloaded and extracted ant in location: C:\Users\Dellk\Downloads\apache-ant-1.10.0-bin\apache-ant-1.10.0 and given system variables as needed
Also specified path in cmd where my workspace is present i.e (C:\Users\Dellk\workspace\Module3junit)
Still getting same error while running ant. Please find attached word doc for further help.
did you add %ANT_HOME%/bin in path system variable?
http://ant.apache.org/manual/install.html
Have a look at attachment.
I had already added "%ANT_HOME%/bin" in PATH system variable. I have read the ANT manual, but still not able to run the ant command.
Hi,
My issue is solved now. I researched a bit and added "%ANT_HOME%/bin" in [b:fh28hv5j]PATH User Variable[/b:fh28hv5j] as well along with PATH system variable. Please look at the attachment.
But now new issue is I am not able to Run the Test successfully with ant compile command in cmd and it is showing [b:fh28hv5j]BUILD FAILED [/b:fh28hv5j]error while Run
Few points to Note as can be seen in attached screenshots:
1. The test case runs successfully in eclipse
2. All paths in build.xml are as suggested in Module 8 (including location of all jar files needed in project). When I downloaded code from qtpselenium site, I kept it in a folder and I have mentioned that same path in build.xml as well. So there will be all required jars present as per my understanding.
3. Build file is generated in workspace but it is empty after Run.
Yes, the jar files were not present in jar folder.
Now I am able to compile and run with ant file. Thank you so much for help.
There is another issue.
When reports are generated after running a [b:fxa07g4o]Test Case Suite[/b:fxa07g4o] (with 3 tests in it) using ant, parameterized test case details and errors are not displayed in HTML reports. However, output is correctly displayed in eclipse console when ran using eclipse.
Please have a look at attachment.
Please refer attachment.
I am not using extent reports. These are normal HTML reports.
I am able to generate XSLT report now. Thanks.
Please refer to my next issue with help of attached screenshots.
[b:3tni3t28]I am able to run a program with Softassert command in eclipse but same program shows BUILD FAILED when compiled or run using ant.[/b:3tni3t28]
NOTE: I am running the program using testng.xml in ant to generate xslt reports, and all batch programs run if passing.
Softassert is a feature of extent report. if you're not using extent report you cannot use Softassert.