Skip to content

Instantly share code, notes, and snippets.

View martinschneider's full-sized avatar
🇹🇼

Martin Schneider martinschneider

🇹🇼
View GitHub Profile
mvn -pl justtestlah-demos test -Dtest=TestRunner -Djusttestlah.properties=/demos/stackoverflow_browserstack.properties
mvn -pl justtestlah-demos test -Dtest=TestRunner -Djusttestlah.properties=/demos/stackoverflow_local.properties
aws devicefarm list-projects
# Device filters
aws.minOsVersion=9.0
aws.maxOsVersion=
aws.osVersion=
aws.model=
aws.manufacturer=
aws.formFactor=PHONE
aws.waitForDevice=true
# Device configuration
Feature: Search and tags
@web @android @ios
Scenario Outline: Use the search function
Given I am on the homepage
When I search for "<tag>"
And I select the first question
Then the question is tagged with "<tag>"
Examples:
| tag |
| selenium |
git clone [email protected]:martinschneider/justtestlah.git
mvn -f justtestlah/pom.xml -pl justtestlah-demos package -Paws -Djusttestlah.propertes=justtestlah-demos/demos/stackoverflow_aws.properties
@martinschneider
martinschneider / LoginTest.java
Last active May 22, 2019 07:04
Test without Page Object pattern
public class LoginTest04 extends CarousellBaseTest {
private By welcomePageLoginButton =
MobileBy.id("com.thecarousell.Carousell:id/welcome_page_login_button");
private By usernameField = MobileBy.xpath("//*[@text=\"email or username\"]");
private By passwordField = MobileBy.xpath("//*[@text=\"password\"]");
private By loginButton = MobileBy.id("com.thecarousell.Carousell:id/login_page_login_button");
private By sellButton = MobileBy.id("com.thecarousell.Carousell:id/button_sell");
@Test
public void testLogin() {
@martinschneider
martinschneider / LoginTest.java
Last active May 22, 2019 07:03
Test with Page Object pattern
@TestInstance(Lifecycle.PER_CLASS)
public class LoginTest06 extends CarousellBaseTest {
@Test
public void testLogin() {
WelcomePage welcome = new WelcomePage(driver);
assertThat(welcome.goToLogin()
.login(new User(username, password))
.canISell())
.as("sell button visible")
@TestInstance(Lifecycle.PER_CLASS)
public class LoginTest05 extends CarousellBaseTest {
@Test
public void testLogin() {
WelcomePage welcome = new WelcomePage(driver);
welcome.goToLogin();
LoginPage login = new LoginPage(driver);
login.login(username, password);
HomePage home = new HomePage(driver);
@martinschneider
martinschneider / WelcomePage.java
Last active May 22, 2019 02:09
Welcome page object
public class WelcomePage {
private WebDriver driver;
private By welcomePageLoginButton =
MobileBy.id("com.thecarousell.Carousell:id/welcome_page_login_button");
public WelcomePage(WebDriver driver) {
this.driver = driver;
}