- Currently working on Selenium WebDriver and using Java. I have a project calledTest.
- In that Project i have many Java Programs such as Login.java, Testing1.java etc.,.
- The scenario is 1st the Login.java need to run once it completed then next file start to run i.e Testing1.java. -Is there any possible to run like this in Eclipse. I'm using FF 26.0 for execution. ** TestNG** frame work.
Asked
Active
Viewed 1,202 times
0

testing
- 1,736
- 15
- 46
- 75
-
3Create test suite and execute all test classes in that suite in the specified order. – Kick Feb 12 '14 at 06:15
-
Use package options for that – Rajendra arora Feb 12 '14 at 06:15
-
possible duplicate: http://stackoverflow.com/questions/17369629/how-to-run-two-selenium-java-files-on-after-the-other-continuously-when-they-don – Bhoot Feb 12 '14 at 06:15
-
How to create a test suite.. Any sample example for the two files – testing Feb 12 '14 at 06:26
-
possible duplicate of [What installable component provides 'launch groups' in Eclipse?](http://stackoverflow.com/questions/9003337/what-installable-component-provides-launch-groups-in-eclipse) – Chandrayya G K Feb 12 '14 at 06:27
-
Please give soltion how to create a test suite – testing Feb 12 '14 at 06:48
-
What's wrong with a single `main` to run each of your components one by one? – barak manos Feb 13 '14 at 13:45
1 Answers
1
1) make a new file src/testng.xml (or edit if already exist)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Default suite">
<test verbose="2" name="Default test">
<classes>
<class name="test.LoginOneReports"/>
<class name="test.OEPR_DefaultTab"/>
</classes>
</test> <!-- Default test -->
</suite> <!-- Default suite -->
2) Eclipse: Run \ Run Configurations... 'Test' tab, 'Suite' radiobutton, Browse. Choose your testng.xml file. Click Run.
Hope it would help ;)

Maxim Kim
- 171
- 2
- 8