Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/tools/sdk-utils/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const JAVA_FRAMEWORK_MAP: Record<string, string> = {
junit5: "junit5",
junit4: "junit4",
cucumber: "cucumber-testng",
serenity: "serenity",
};

// Common Gradle setup instructions (platform-independent)
Expand Down
58 changes: 58 additions & 0 deletions src/tools/sdk-utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,63 @@ gradle clean test
\`\`\`
`;

const serenityInstructions = (username: string, accessKey: string) => `
---STEP---

Set BrowserStack credentials as environment variables:
For macOS/Linux:
\`\`\`bash
export BROWSERSTACK_USERNAME=${username}
export BROWSERSTACK_ACCESS_KEY=${accessKey}
\`\`\`

For Windows Command Prompt:
\`\`\`cmd
set BROWSERSTACK_USERNAME=${username}
set BROWSERSTACK_ACCESS_KEY=${accessKey}
\`\`\`

---STEP---

Add serenity-browserstack dependency in pom.xml:
Add the following dependency to your pom.xml file and save it:
\`\`\`xml
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-browserstack</artifactId>
<version>3.3.4</version>
</dependency>
\`\`\`

---STEP---

Set up serenity.conf file:
Create or update your serenity.conf file in the project root with the following configuration:
\`\`\`
webdriver {
driver = remote
remote.url = "https://hub.browserstack.com/wd/hub"
}
browserstack.user="${username}"
browserstack.key="${accessKey}"
\`\`\`

---STEP---

Run your Serenity tests:
You can continue running your tests as you normally would. For example:

Using Maven:
\`\`\`bash
mvn clean verify
\`\`\`

Using Gradle:
\`\`\`bash
gradle clean test
\`\`\`
`;

/**
* ---------- CSharp INSTRUCTIONS ----------
*/
Expand Down Expand Up @@ -488,6 +545,7 @@ export const SUPPORTED_CONFIGURATIONS: ConfigMapping = {
cucumber: { instructions: javaInstructions },
junit4: { instructions: javaInstructions },
junit5: { instructions: javaInstructions },
serenity: { instructions: serenityInstructions },
},
},
csharp: {
Expand Down
1 change: 1 addition & 0 deletions src/tools/sdk-utils/percy/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export const PERCY_INSTRUCTIONS: PercyConfigMapping = {
cucumber: { script_updates: javaSeleniumInstructions },
junit4: { script_updates: javaSeleniumInstructions },
junit5: { script_updates: javaSeleniumInstructions },
serenity: { script_updates: javaSeleniumInstructions },
},
},
csharp: {
Expand Down
1 change: 1 addition & 0 deletions src/tools/sdk-utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export enum SDKSupportedTestingFrameworkEnum {
junit4 = "junit4",
junit5 = "junit5",
testng = "testng",
serenity = "serenity",
cypress = "cypress",
nunit = "nunit",
mstest = "mstest",
Expand Down