Search This Blog

Thursday, February 4, 2016

Run TestNG programmatically from Eclipse


Make sure your testng.xml is in some folder and it is used as shown below.


package initialize;

import java.util.ArrayList;
import java.util.List;

import org.testng.TestListenerAdapter;
import org.testng.TestNG;

public class test {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
 TestNG testng = new TestNG();
 
   TestListenerAdapter tla = new TestListenerAdapter();
   List<String> testFilesList = new ArrayList<String>();
   testFilesList.add(".\\resources\\testng.xml");
   System.out.println(System.getProperty("user.dir"));
testng.setTestSuites(testFilesList); //you can addd multiple suites either here by adding multiple files or include all suites needed in the testng.xml file
       testng.setUseDefaultListeners(false);
       testng.addListener(tla);
       testng.run();
}

}



Tuesday, January 26, 2016

Eclipse Che install on windows

Tried all the install methods on the downloads page the stuff that worked for me on windows 7 was .

Get the git from the repo.
https://github.com/codenvy/che

Follow the read me and build from source with mvn clean install


che.bat start and tomcat is started.

http://localhost:8080/ide ( please note localhost:8080 won't open any thing)