mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-01-09 04:38:08 -05:00
Run all scenario tests and cleanup after each test
This commit is contained in:
parent
414bc658ba
commit
7764351a37
@ -32,8 +32,8 @@ public class AllTests {
|
|||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
TestSuite suite = new TestSuite("Scenario-Tests");
|
TestSuite suite = new TestSuite("Scenario-Tests");
|
||||||
//$JUnit-BEGIN$
|
//$JUnit-BEGIN$
|
||||||
//suite.addTestSuite(ServerListScenarios.class);
|
suite.addTestSuite(ServerListScenarios.class);
|
||||||
//suite.addTestSuite(ConnectionScenarios.class);
|
suite.addTestSuite(ConnectionScenarios.class);
|
||||||
suite.addTestSuite(ChannelScenarios.class);
|
suite.addTestSuite(ChannelScenarios.class);
|
||||||
//$JUnit-END$
|
//$JUnit-END$
|
||||||
return suite;
|
return suite;
|
||||||
|
@ -23,6 +23,7 @@ package org.yaaic.test.scenario;
|
|||||||
|
|
||||||
|
|
||||||
import android.test.ActivityInstrumentationTestCase2;
|
import android.test.ActivityInstrumentationTestCase2;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import com.jayway.android.robotium.solo.Solo;
|
import com.jayway.android.robotium.solo.Solo;
|
||||||
|
|
||||||
@ -73,7 +74,11 @@ public class ChannelScenarios extends ActivityInstrumentationTestCase2
|
|||||||
helper.disconnectFromServer();
|
helper.disconnectFromServer();
|
||||||
helper.deleteTestServer();
|
helper.deleteTestServer();
|
||||||
|
|
||||||
solo.sleep(500);
|
try {
|
||||||
|
solo.finalize();
|
||||||
|
} catch (Throwable t) {
|
||||||
|
Log.d("Yaaic/ChannelScenarios", t.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,6 +23,7 @@ package org.yaaic.test.scenario;
|
|||||||
|
|
||||||
|
|
||||||
import android.test.ActivityInstrumentationTestCase2;
|
import android.test.ActivityInstrumentationTestCase2;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import com.jayway.android.robotium.solo.Solo;
|
import com.jayway.android.robotium.solo.Solo;
|
||||||
|
|
||||||
@ -73,7 +74,11 @@ public class ConnectionScenarios extends ActivityInstrumentationTestCase2
|
|||||||
helper.disconnectFromServer();
|
helper.disconnectFromServer();
|
||||||
helper.deleteTestServer();
|
helper.deleteTestServer();
|
||||||
|
|
||||||
solo.sleep(500);
|
try {
|
||||||
|
solo.finalize();
|
||||||
|
} catch (Throwable t) {
|
||||||
|
Log.d("Yaaic/ChannelScenarios", t.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,6 +24,7 @@ package org.yaaic.test.scenario;
|
|||||||
|
|
||||||
import com.jayway.android.robotium.solo.Solo;
|
import com.jayway.android.robotium.solo.Solo;
|
||||||
import android.test.ActivityInstrumentationTestCase2;
|
import android.test.ActivityInstrumentationTestCase2;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scenario Tests for the ServersActivity
|
* Scenario Tests for the ServersActivity
|
||||||
@ -53,11 +54,25 @@ public class ServerListScenarios extends ActivityInstrumentationTestCase2
|
|||||||
/**
|
/**
|
||||||
* Setup test case
|
* Setup test case
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void setUp()
|
protected void setUp()
|
||||||
{
|
{
|
||||||
solo = new Solo(getInstrumentation(), getActivity());
|
solo = new Solo(getInstrumentation(), getActivity());
|
||||||
helper = new ScenarioHelper(solo);
|
helper = new ScenarioHelper(solo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cleanup after run
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void tearDown()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
solo.finalize();
|
||||||
|
} catch (Throwable t) {
|
||||||
|
Log.d("Yaaic/ChannelScenarios", t.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test-Scenario:
|
* Test-Scenario:
|
||||||
|
Loading…
Reference in New Issue
Block a user