File tree Expand file tree Collapse file tree 2 files changed +52
-2
lines changed Expand file tree Collapse file tree 2 files changed +52
-2
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,46 @@ browserstack-sdk python <path-to-test-file>
3333\`\`\`
3434` ;
3535
36+ const argsInstruction =
37+ '<argLine>-javaagent:"${com.browserstack:browserstack-java-sdk:jar}"</argLine>' ;
38+
39+ const javaInstructions = `
40+ Strictly Add the following dependencies to your \`pom.xml\`:
41+ \`\`\`xml
42+ <dependency>
43+ <groupId>com.browserstack</groupId>
44+ <artifactId>browserstack-java-sdk</artifactId>
45+ <version>LATEST</version>
46+ <scope>compile</scope>
47+ </dependency>
48+
49+ ${ argsInstruction }
50+ \`\`\`
51+
52+ For Gradle projects, add to \`build.gradle\`:
53+ \`\`\`groovy
54+ dependencies {
55+ implementation 'com.browserstack:browserstack-java-sdk:LATEST'
56+ }
57+ \`\`\`
58+
59+ Inform user to export:
60+ \`\`\`bash
61+ export BROWSERSTACK_USERNAME=${ config . browserstackUsername }
62+ export BROWSERSTACK_ACCESS_KEY=${ config . browserstackAccessKey }
63+ \`\`\`
64+
65+ Run tests using:
66+ \`\`\`bash
67+ mvn clean test
68+ \`\`\`
69+
70+ Or for Gradle:
71+ \`\`\`bash
72+ gradle clean test
73+ \`\`\`
74+ ` ;
75+
3676export const SUPPORTED_CONFIGURATIONS : ConfigMapping = {
3777 nodejs : {
3878 playwright : {
@@ -59,4 +99,12 @@ export const SUPPORTED_CONFIGURATIONS: ConfigMapping = {
5999 behave : { instructions : pythonInstructions } ,
60100 } ,
61101 } ,
102+ java : {
103+ playwright : { } ,
104+ selenium : {
105+ testng : { instructions : javaInstructions } ,
106+ cucumber : { instructions : javaInstructions } ,
107+ junit : { instructions : javaInstructions } ,
108+ } ,
109+ } ,
62110} ;
Original file line number Diff line number Diff line change 1- export type SDKSupportedLanguage = "nodejs" | "python" ;
1+ export type SDKSupportedLanguage = "nodejs" | "python" | "java" ;
22export type SDKSupportedBrowserAutomationFramework = "playwright" | "selenium" ;
33export type SDKSupportedTestingFramework =
44 | "jest"
@@ -10,7 +10,9 @@ export type SDKSupportedTestingFramework =
1010 | "cucumber"
1111 | "nightwatch"
1212 | "webdriverio"
13- | "mocha" ;
13+ | "mocha"
14+ | "junit"
15+ | "testng" ;
1416
1517export type ConfigMapping = Record <
1618 SDKSupportedLanguage ,
You can’t perform that action at this time.
0 commit comments