forked from cucumber/cucumber-java-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRunCucumberTest.java
43 lines (34 loc) · 1 KB
/
RunCucumberTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* ownCloud Android Scenario Tests
*
* @author Jesús Recio Rincón (@jesmrec)
*/
package io.cucumber;
import android.AndroidManager;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import java.util.logging.Level;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import utils.LocProperties;
import utils.log.Log;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty"})
public class RunCucumberTest {
@BeforeClass
public static void beforeclass() {
Log.init();
Log.log(Level.FINE, "START EXECUTION\n");
}
@AfterClass
public static void afterclass() {
//remove the oC app
AndroidManager.getDriver().removeApp(
LocProperties.getProperties().getProperty("appPackage"));
//remove Appium Settings
AndroidManager.getDriver().removeApp("io.appium.settings");
AndroidManager.getDriver().quit();
Log.log(Level.FINE, "END EXECUTION\n");
}
}