diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/prereg/testrunner/MosipTestRunner.java b/api-test/src/main/java/io/mosip/testrig/apirig/prereg/testrunner/MosipTestRunner.java
index 330beb9863..5c45a792dd 100644
--- a/api-test/src/main/java/io/mosip/testrig/apirig/prereg/testrunner/MosipTestRunner.java
+++ b/api-test/src/main/java/io/mosip/testrig/apirig/prereg/testrunner/MosipTestRunner.java
@@ -121,7 +121,6 @@ public static void suiteSetup(String runType) {
}
BaseTestCase.currentModule = GlobalConstants.PREREG;
- BaseTestCase.setReportName(GlobalConstants.PREREG);
AdminTestUtil.copyPreregTestResource();
BaseTestCase.otpListener = new OTPListener();
BaseTestCase.otpListener.run();
@@ -156,15 +155,21 @@ public static void startTestRunner() {
homeDir = new File(dir.getParent() + "/mosip/testNgXmlFiles");
LOGGER.info("ELSE :" + homeDir);
}
- for (File file : homeDir.listFiles()) {
- if (file.getName().toLowerCase().contains(GlobalConstants.PREREG)) {
- suitefiles.add(file.getAbsolutePath());
+ File[] files = homeDir.listFiles();
+ if (files != null) {
+ for (File file : files) {
+ if (file.getName().toLowerCase().contains("mastertestsuite")) {
+ BaseTestCase.setReportName(GlobalConstants.PREREG);
+ suitefiles.add(file.getAbsolutePath());
+ runner.setTestSuites(suitefiles);
+ System.getProperties().setProperty("testng.outpur.dir", "testng-report");
+ runner.setOutputDirectory("testng-report");
+ runner.run();
+ }
}
+ } else {
+ LOGGER.error("No files found in directory: " + homeDir);
}
- runner.setTestSuites(suitefiles);
- System.getProperties().setProperty("testng.outpur.dir", "testng-report");
- runner.setOutputDirectory("testng-report");
- runner.run();
}
public static String getGlobalResourcePath() {
diff --git a/api-test/testNgXmlFiles/preregMasterTestSuite.xml b/api-test/testNgXmlFiles/preregMasterTestSuite.xml
new file mode 100644
index 0000000000..509f3cf5d5
--- /dev/null
+++ b/api-test/testNgXmlFiles/preregMasterTestSuite.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api-test/testNgXmlFiles/preregApi.xml b/api-test/testNgXmlFiles/preregSuite.xml
similarity index 99%
rename from api-test/testNgXmlFiles/preregApi.xml
rename to api-test/testNgXmlFiles/preregSuite.xml
index 8f6b7d17e2..30881b772c 100644
--- a/api-test/testNgXmlFiles/preregApi.xml
+++ b/api-test/testNgXmlFiles/preregSuite.xml
@@ -1,7 +1,7 @@
-
+