-1

I am working in an MNC, I have a pre-created selenium-maven framework where we run test cases by commenting uncommenting them. Eg.

<class name="abc.def.ghi.testCaseName1"/>
<class name="abc.def.ghi.testCaseName2"/>
<!-- <class name="abc.def.ghi.testCaseName3"/> -->

But now I am required to change it's look and feel soo that while running test cases we do not have to comment and uncomment test cases rather run it through some UI. Is it possible?

Please let me know an opensource application though which we can achieve it and it should comply with MNC policies soo that it does not take necessary information.

  • Seeking recommendations for books, tools, software libraries, and more. This question is likely to lead to opinion-based answers. – cruisepandey Sep 15 '21 at 06:59
  • You can create simple UI by your own in Swing -> https://www.javatpoint.com/java-swing. – pburgr Sep 15 '21 at 07:06
  • 1
    You can create your own UI with java frames and suitable layouts. Something like this https://stackoverflow.com/questions/62267580/why-does-my-jar-file-gui-display-perfectly-on-my-computer-but-not-on-another-com – Nandan A Sep 15 '21 at 07:42

1 Answers1

0

If you don't want to comment and uncomment the xml files, you need to create main method and run from there,

public static void main(String args[]){
    String xmlFilesList = args[0];
    String groupName = args[1];
    List<String> suites = new ArrayList<>();
    String[] filenames = xmlFilesList.split(",");
    for(String eachFIlename: filenames){
        String newFilename = "Inputs/Suites/"+eachFIlename+".xml";
        suites.add(newFilename);
    }
    TestNG runner = new TestNG();
    runner.setTestSuites(suites);
    runner.setGroups(groupName);
    runner.run();
}
Jayanth Bala
  • 758
  • 1
  • 5
  • 11