Commit 2c1f2ae4 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Added tester class for each suite + improved performances

parent ae27f4d8
To run all the tests:
./gradlew connectAndroidTest
To run a specific suite:
adb shell am instrument -w -r -e debug false -e class 'org.linphone.tester.<suite name>Tests' org.linphone.tester.test/android.support.test.runner.AndroidJUnitRunner
......@@ -16,6 +16,17 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
testOptions {
// Changes the directory where Gradle saves test reports. By default, Gradle saves test reports
// in the path_to_your_project/module_name/build/outputs/reports/ directory.
// '$rootDir' sets the path relative to the root directory of the current project.
reportDir "$rootDir/"
// Changes the directory where Gradle saves test results. By default, Gradle saves test results
// in the path_to_your_project/module_name/build/outputs/test-results/ directory.
// '$rootDir' sets the path relative to the root directory of the current project.
resultsDir "$rootDir/"
}
sourceSets {
main {
packagingOptions {
......
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class AccountCreatorTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Account creator");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Account creator"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Account creator", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class AudioBypassTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Audio Bypass");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Audio Bypass"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Audio Bypass", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class ClonableObjectTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("ClonableObject");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "ClonableObject"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("ClonableObject", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class ConferenceEventTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Conference event");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Conference event"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Conference event", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class ContentsTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Contents");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Contents"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Contents", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class CpimTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Cpim");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Cpim"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Cpim", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class DTMFTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("DTMF");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "DTMF"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("DTMF", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class EventTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Event");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Event"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Event", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class FlexisipTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Flexisip");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Flexisip"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Flexisip", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class GroupChatTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Group Chat");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Group Chat"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Group Chat", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class LogCollectionTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("LogCollection");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "LogCollection"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("LogCollection", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class MainDbTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("MainDb");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "MainDb"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("MainDb", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class MessageTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Message");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Message"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Message", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class MultiCallTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Multi call");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Multi call"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Multi call", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class MulticastCallTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Multicast Call");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Multicast Call"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Multicast Call", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class MultipartTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Multipart");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Multipart"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Multipart", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class OfferAnswerTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Offer-answer");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Offer-answer"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Offer-answer", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class PlayerTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Player");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Player"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Player", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class PresenceTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Presence");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Presence"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Presence", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class PresenceUsingServerTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Presence using server");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Presence using server"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Presence using server", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class PropertyContainerTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("PropertyContainer");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "PropertyContainer"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("PropertyContainer", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class ProxyConfigTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Proxy config");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Proxy config"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Proxy config", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class QualityReportingTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("QualityReporting");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "QualityReporting"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("QualityReporting", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class RegisterTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Register");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Register"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Register", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class RemoteProvisioningTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("RemoteProvisioning");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "RemoteProvisioning"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("RemoteProvisioning", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class SetupTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Setup");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Setup"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Setup", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)