diff --git a/pom.xml b/pom.xml index da1b1b66..2c24f2ee 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ UTF-8 - 4.0.15 + 4.0.30 UTF-8 @@ -82,12 +82,6 @@ 5.10.0 test - - net.serenity-bdd - serenity-saucelabs - ${serenity.version} - test - ch.qos.logback logback-classic @@ -97,7 +91,11 @@ org.assertj assertj-core 3.22.0 - test + + + org.opentest4j + opentest4j + 1.2.0 @@ -179,6 +177,36 @@ http://localhost:8080/angularjs/#/ + + browserstack + + + net.serenity-bdd + serenity-browserstack + ${serenity.version} + + + + + lambdatest + + + net.serenity-bdd + serenity-lambdatest + ${serenity.version} + + + + + saucelabs + + + net.serenity-bdd + serenity-saucelabs + ${serenity.version} + + + failing diff --git a/src/main/java/net/serenitybdd/demos/todos/pageobjects/steps/TodoUserSteps.java b/src/main/java/net/serenitybdd/demos/todos/pageobjects/steps/TodoUserSteps.java index 8bc2d4b1..15344ae2 100644 --- a/src/main/java/net/serenitybdd/demos/todos/pageobjects/steps/TodoUserSteps.java +++ b/src/main/java/net/serenitybdd/demos/todos/pageobjects/steps/TodoUserSteps.java @@ -1,11 +1,14 @@ package net.serenitybdd.demos.todos.pageobjects.steps; import net.serenitybdd.core.steps.UIInteractions; +import net.serenitybdd.demos.todos.pageobjects.model.TodoStatus; import net.serenitybdd.demos.todos.pageobjects.model.TodoStatusFilter; import net.serenitybdd.demos.todos.pageobjects.pages.TodoListPage; import net.thucydides.model.ThucydidesSystemProperty; import net.serenitybdd.annotations.Step; import net.thucydides.model.util.EnvironmentVariables; +import org.assertj.core.api.Assertions; +import org.assertj.core.api.SoftAssertions; import static java.util.Arrays.asList; import static net.serenitybdd.demos.todos.pageobjects.model.TodoStatus.Active; @@ -108,7 +111,6 @@ public void should_see_that_that_following_item_is_marked_as_active(String item) @Step public void should_see_that_the_number_of_items_left_is(int expected) { - assertThat(todoListPage.numberOfItemsLeft(), is(expected)); } diff --git a/src/test/java/net/serenitybdd/demos/todos/cucumber/CucumberTestSuite.java b/src/test/java/net/serenitybdd/demos/todos/cucumber/CucumberTestSuite.java index 9b598abd..f0e3f4e8 100644 --- a/src/test/java/net/serenitybdd/demos/todos/cucumber/CucumberTestSuite.java +++ b/src/test/java/net/serenitybdd/demos/todos/cucumber/CucumberTestSuite.java @@ -6,10 +6,12 @@ import org.junit.platform.suite.api.Suite; import static io.cucumber.junit.platform.engine.Constants.PLUGIN_PROPERTY_NAME; +import static io.cucumber.junit.platform.engine.Constants.FILTER_TAGS_PROPERTY_NAME; @Suite @IncludeEngines("cucumber") @SelectClasspathResource("/features") +//@ConfigurationParameter(key = FILTER_TAGS_PROPERTY_NAME, value = "@current") @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "io.cucumber.core.plugin.SerenityReporterParallel,pretty,timeline:target/test-results/timeline") public class CucumberTestSuite { diff --git a/src/test/java/net/serenitybdd/demos/todos/cucumber/steps/BrowserCustomisation.java b/src/test/java/net/serenitybdd/demos/todos/cucumber/steps/BrowserCustomisation.java new file mode 100644 index 00000000..2386e77b --- /dev/null +++ b/src/test/java/net/serenitybdd/demos/todos/cucumber/steps/BrowserCustomisation.java @@ -0,0 +1,2 @@ +package net.serenitybdd.demos.todos.cucumber.steps;public class BrowserCustomisation { +} diff --git a/src/test/resources/features/cucumber/maintain_my_todo_list/filtering_todos.feature b/src/test/resources/features/cucumber/maintain_my_todo_list/filtering_todos.feature index 399d89b1..a7dcea7a 100644 --- a/src/test/resources/features/cucumber/maintain_my_todo_list/filtering_todos.feature +++ b/src/test/resources/features/cucumber/maintain_my_todo_list/filtering_todos.feature @@ -2,15 +2,9 @@ @filtering Feature: Filtering todos - In order to make me feel **a sense of accomplishment** + In order to make me feel a sense of accomplishment As a forgetful person - I want to be to _view all of things I have completed_ - - Scenario: View only the completed items - Given that Jane has a todo list containing Buy some milk, Walk the dog - And she completes the task called "Walk the dog" - When she filters her list to show only Completed tasks - Then her todo list should contain Walk the dog + I want to be to view all of things I have completed Scenario Outline: Viewing the items by status Given that Jane has a todo list containing diff --git a/src/test/resources/junit-platform.properties b/src/test/resources/junit-platform.properties index 715e1c87..b5b5e532 100644 --- a/src/test/resources/junit-platform.properties +++ b/src/test/resources/junit-platform.properties @@ -4,8 +4,8 @@ junit.jupiter.execution.parallel.enabled=true junit.jupiter.execution.parallel.config.strategy=fixed junit.jupiter.execution.parallel.mode.default = concurrent junit.jupiter.execution.parallel.mode.classes.default = concurrent -junit.jupiter.execution.parallel.config.fixed.parallelism=4 -junit.jupiter.execution.parallel.config.fixed.max-pool-size=4 +junit.jupiter.execution.parallel.config.fixed.parallelism=5 +junit.jupiter.execution.parallel.config.fixed.max-pool-size=5 # # Required to run Serenity Cucumber tests with JUnit 5 if you don't define this plugin in your runner class @@ -33,8 +33,8 @@ junit.jupiter.execution.parallel.config.fixed.max-pool-size=4 #---------------------------------------------------------- cucumber.execution.parallel.enabled=true cucumber.execution.parallel.config.strategy=fixed -cucumber.execution.parallel.config.fixed.parallelism=4 -cucumber.execution.parallel.config.fixed.max-pool-size=4 +cucumber.execution.parallel.config.fixed.parallelism=5 +cucumber.execution.parallel.config.fixed.max-pool-size=5 cucumber.plugin=io.cucumber.core.plugin.SerenityReporterParallel,pretty,timeline:target/test-results/timeline diff --git a/src/test/resources/serenity.conf b/src/test/resources/serenity.conf index 5ce6d26b..cc2db22e 100644 --- a/src/test/resources/serenity.conf +++ b/src/test/resources/serenity.conf @@ -26,6 +26,7 @@ serenity { # # Report on test durations report.test.durations = true + take.screenshots=FOR_FAILURES # Store HTML source for each page # (can be: ALWAYS, FAILURES or NEVER) // store.html = FAILURES @@ -34,7 +35,7 @@ serenity { // Default page configuration home.page = "http://todomvc.com/examples/angularjs/#/" -environment = browserstack +environment = "prod,chrome" environments { local { home.page = "http://localhost:8080/angularjs/#/" @@ -75,7 +76,6 @@ environments { acceptInsecureCerts = true unhandledPromptBehavior = "dismiss" strictFileInteractability = true - "moz:firefoxOptions" { args = ["-headless"], prefs { @@ -86,37 +86,8 @@ environments { } } } - lambdatest { - home.page = "http://todomvc.com/examples/angularjs/#/" - # - # You define the Lambdatest credentials either in the LT_USERNAME and LT_ACCESS_KEY environment variables, or by - # setting the following properties: - # - # lt.user = your.username - # lt.key = your.access.key - # - # You can also override the Lambdatest grid url by setting the following property. - # lt.grid="hub.lambdatest.com" - webdriver { - driver = remote - remote.url = "https://"${LT_USERNAME}":"${LT_ACCESS_KEY}"@hub.lambdatest.com/wd/hub" - capabilities { - browserName = "chrome" - "goog:chromeOptions" { - args = ["test-type", "no-sandbox", "ignore-certificate-errors", "--window-size=1000,800", - "incognito", "disable-infobars", "disable-gpu", "disable-default-apps", "disable-popup-blocking"] - } - "LT:options" { - platformName = "Windows 10" - } - } - } - } browserstack { home.page = "http://todomvc.com/examples/angularjs/#/" - # - # You define the BrowserStack credentials either in the BROWSERSTACK_USER and BROWSERSTACK_KEY environment variables - # webdriver { driver = "remote" remote.url = "https://"${BROWSERSTACK_USER}":"${BROWSERSTACK_KEY}"@hub.browserstack.com/wd/hub" @@ -129,29 +100,20 @@ environments { "bstack:options" { os = "Windows" osVersion = "11" - browserVersion = "latest" - local = false - resolution = "1920x1200" - seleniumVersion = "4.6.0" - video = true idleTimeout = 600 } + "goog:chromeOptions" { + args = ["test-type", "no-sandbox", "ignore-certificate-errors", "--window-size=1000,800", + "incognito", "disable-infobars", "disable-gpu", "disable-default-apps", "disable-popup-blocking"] + } } } } saucelabs { home.page = "http://todomvc.com/examples/angularjs/#/" - # - # You define the BrowserStack credentials either in the BROWSERSTACK_USER and BROWSERSTACK_KEY environment variables, or by - # setting the following properties: - # - # browserstack.user = your.username - # browserstack.key = your.access.key - # webdriver { driver = "remote" remote.url = "https://"${SAUCE_USERNAME}":"${SAUCE_ACCESS_KEY}"@ondemand.us-west-1.saucelabs.com:443/wd/hub" - platformName = "Windows 11" capabilities { browserName = "Chrome" @@ -165,4 +127,21 @@ environments { } } } + lambdatest { + home.page = "http://todomvc.com/examples/angularjs/#/" + webdriver { + driver = remote + remote.url = "https://"${LT_USERNAME}":"${LT_ACCESS_KEY}"@hub.lambdatest.com/wd/hub" + capabilities { + browserName = "chrome" + "goog:chromeOptions" { + args = ["test-type", "no-sandbox", "ignore-certificate-errors", "--window-size=1000,800", + "incognito", "disable-infobars", "disable-gpu", "disable-default-apps", "disable-popup-blocking"] + } + "LT:options" { + platformName = "Monterey" + } + } + } + } }