mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-02 03:48:09 +00:00
41 lines
1.2 KiB
Java
41 lines
1.2 KiB
Java
package automationTests;
|
|
|
|
import java.io.IOException;
|
|
import java.net.MalformedURLException;
|
|
import java.util.Calendar;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
import org.json.simple.JSONArray;
|
|
import org.json.simple.JSONObject;
|
|
import org.junit.internal.TextListener;
|
|
import org.junit.runner.JUnitCore;
|
|
import org.junit.runner.Result;
|
|
|
|
public class TestSuite {
|
|
static APIClient client;
|
|
public static void main(String args[]) throws Exception {
|
|
|
|
client = new APIClient("https://telecominfraproject.testrail.com");
|
|
client.setUser("syama.devi@connectus.ai");
|
|
client.setPassword("Connect123$");
|
|
|
|
JUnitCore junit = new JUnitCore();
|
|
junit.addListener(new TextListener(System.out));
|
|
Result result = junit.run(SystemTests.class);
|
|
Result result1 = junit.run(ProfilesTest.class);
|
|
Result result2 = junit.run(NetworkTest.class);
|
|
Result result3 = junit.run(LoginTest.class);
|
|
Result result4 = junit.run(UsersTest.class);
|
|
Result result5 = junit.run(DashboardTest.class);
|
|
if (result3.getFailureCount() > 0) {
|
|
System.out.println("Tests failed.");
|
|
System.exit(1);
|
|
} else {
|
|
System.out.println("Tests finished successfully.");
|
|
System.exit(0);
|
|
}
|
|
|
|
}
|
|
}
|