Results 1 to 1 of 1
Thread: Eclipse + TestNG+Ant..confused
- 10-20-2013, 11:16 AM #1Member
- Join Date
- Jul 2013
- Dublin, CA
- Rep Power
Eclipse + TestNG+Ant..confused
Hello, hope someone can help me.
1. I have Eclipse Kepler
2. It came with Ant
3. I set-up TestNG plugin for Eclipse
I created one class called 'CommonMethods' and second class 'TestCommonMethods'.
In my 'TestCommonMethods' class I am using TestNG annotations (just basic ones @BeforeTest, @Test, @AfterTest). I put @Test before a regular method and inside I specify what I want to test.
I can run separate methods annotated with @Test without problems.
I found a folder named 'test-output' in my project workspace which I guess was created by default by TestNG because I did not create it. Inside of 'test-output' I have 'default suite' folder which has 'default suite.html'.
So I can run a single @Test method and check the output in 'default suite.html'. Every time I run a test the 'default suite.html' gets over-ridden.
Where I am stuck:
1. I want to run not just one but multiple methods that have @Test annotation.
2. I want to know how I can keep results of running my tests so they don't get over-ridden.
3. I want to specify a folder for my test results (instead of 'test-output' I want to create a folder on my Desktop if it is possible).
I googled it and it looks like to run multiple methods I need to use Ant. I need to create a build.xml file.
So here are my questions:
1. I am really confused with build.xml for Ant projects and testng.xml.
What is the difference? I know they are both xml files but it looks like I need to create Ant build.xml if I want to run 2 or more @Test methods, correct?
testng.xml ..what is it for? How would you use it?
2. In my Ant build.xml file I need to put this lineJava Code:
- By tweaked88 in forum EclipseReplies: 7Last Post: 02-16-2013, 01:48 AM
- By minabarnes in forum New To JavaReplies: 6Last Post: 01-14-2013, 05:16 AM
- By alexandra12 in forum EclipseReplies: 0Last Post: 08-05-2012, 03:10 AM
- By raindog308 in forum EclipseReplies: 1Last Post: 01-18-2011, 03:34 AM
- By updev in forum AWT / SwingReplies: 6Last Post: 11-14-2008, 04:33 PM