Add serenity-cucumber sample folder#5
Open
vishantkkk wants to merge 4 commits into
Open
Conversation
Adds a Serenity-Cucumber BDD variant alongside the existing java/junit-4/junit-5/testng folders. Mirrors the junit-5 structure with two scenarios (add-to-cart, checkout) on bstackdemo.com expressed as Gherkin features and run via the JUnit 5 Platform Suite + Cucumber JUnit Platform Engine. Uses RemoteWebDriver against a local Selenium Grid hub at localhost:4444/wd/hub, matching the rest of the repo.
Cucumber's @ignore tag can mark every scenario as skipped — Maven then exits 0 with zero scenarios executed and the load test reports a false success on no work. failIfNoTests=true makes Maven fail the build instead. Cucumber-specific safety; not relevant to the JUnit/TestNG siblings.
Collaborator
Author
|
semgrep/ci |
The cart panel slides in async after the add-to-cart click, so getText() on the cart's product title can return an empty string before the panel finishes rendering. Add an explicit WebDriverWait to wait for the text to appear, then assert. Smoke tested locally end-to-end (Selenium Grid + bstackdemo.com): 2 scenarios, 11 steps, all passing.
The previous narrow include `<include>**/RunCucumberTest.java</include>` worked only as long as the runner class kept that exact filename. Combined with `failIfNoTests=true`, any rename (e.g. CucumberTestRunner.java — which is the more common Cucumber JUnit5 Suite convention) made Surefire find zero tests and Maven exit with BUILD FAILURE *before any test ran*. On the BrowserStack Load Testing pod this surfaced as `errorType: initialization` with no log artifacts uploaded. Switch to the four standard test-class patterns (Test*/Tests/TestCase) plus `*Runner.java` to cover both Cucumber Suite naming conventions. This keeps `failIfNoTests=true` honest while letting users rename the runner class without silently breaking their LT runs. Caught by the LTS-2849 QA watchdog (TC-21) on 2026-05-04 — see BStackAutomation PR #65129 commit 35655ce23df for the matching fix in the QA repo's local seed of this sample.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
serenity-cucumber/sample folder alongside the existingjava/,junit-4/,junit-5/, andtestng/variants — covers the Serenity-Cucumber BDD framework being added to BrowserStack Load Testing under LTS-2849.Mirrors the
junit-5structure with two scenarios (add-to-cart, checkout) onbstackdemo.com, expressed as Gherkin features and run via the JUnit 5 Platform Suite + Cucumber JUnit Platform Engine. Uses RemoteWebDriver against a local Selenium Grid hub atlocalhost:4444/wd/hub, matching the rest of the repo.Folder contents
What differs from sibling variants (and why)
maven.compiler.source/target1117<include>**/*Test.java**/RunCucumberTest.javafailIfNoTeststrue@ignorecan skip every scenario; without this, Maven exits 0 on zero work and the load test reports false successSimpleTest.javaRunCucumberTest.java+StepDefs.java+bstackdemo.featureframework:in YAMLjunit/testngserenity-cucumberSELENIUM_FRAMEWORK_SERENITY_CUCUMBERVerifying locally