Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
spoed01
Posts : 5
Join date : 2011-08-19

TestNG reports written to the  wrong directory. Empty TestNG reports written to the wrong directory.

Wed Jul 17, 2013 10:30 pm
Hello,
I use TestNG in combination with an testng.xml file, so that i can start different classes at once.
The testng.xml looks like below.
The reports "TmpTest1.html" and "TmpTest2.html" are written to the "test-output\TmpSuite" directory. This is ok.
The other reports (the .html files) are written to the "test-output\old\TmpSuite" direcotory (in the same run).
I do not want the other reports in the "old" directory, they also must be placed in the "test-output\TmpSuite".
How can i do this? What is wrong?

//////////////////////////////////////////////////testng.xml//////////////////////////////////////////////////
package myPack;
import java.util.ArrayList;
import java.util.List;
import org.testng.TestNG;
import org.testng.annotations.Test;
import org.testng.xml.XmlClass;
import org.testng.xml.XmlSuite;
import org.testng.xml.XmlTest;
public class testParaPro1 {

@Test
public void myTest1() throws InterruptedException{
XmlSuite suite = new XmlSuite();
suite.setName("TmpSuite");
suite.setParallel("tests");
suite.setThreadCount(5);

XmlTest test1 = new XmlTest(suite);
test1.setName("TmpTest1");
List class1 = new ArrayList();
class1.add(new XmlClass("myPack.testNG1"));
test1.setXmlClasses(class1) ;

XmlTest test2 = new XmlTest(suite);
test2.setName("TmpTest2");
List class2 = new ArrayList();
class2.add(new XmlClass("myPack.testNG2"));
test2.setXmlClasses(class2) ;

List suites = new ArrayList();
suites.add(suite);
TestNG tng = new TestNG();
tng.setXmlSuites(suites);
tng.run();
}
}
Back to top
Permissions in this forum:
You cannot reply to topics in this forum