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>
33
33
\`\`\`
34
34
` ;
35
35
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
+
36
76
export const SUPPORTED_CONFIGURATIONS : ConfigMapping = {
37
77
nodejs : {
38
78
playwright : {
@@ -59,4 +99,12 @@ export const SUPPORTED_CONFIGURATIONS: ConfigMapping = {
59
99
behave : { instructions : pythonInstructions } ,
60
100
} ,
61
101
} ,
102
+ java : {
103
+ playwright : { } ,
104
+ selenium : {
105
+ testng : { instructions : javaInstructions } ,
106
+ cucumber : { instructions : javaInstructions } ,
107
+ junit : { instructions : javaInstructions } ,
108
+ } ,
109
+ } ,
62
110
} ;
Original file line number Diff line number Diff line change 1
- export type SDKSupportedLanguage = "nodejs" | "python" ;
1
+ export type SDKSupportedLanguage = "nodejs" | "python" | "java" ;
2
2
export type SDKSupportedBrowserAutomationFramework = "playwright" | "selenium" ;
3
3
export type SDKSupportedTestingFramework =
4
4
| "jest"
@@ -10,7 +10,9 @@ export type SDKSupportedTestingFramework =
10
10
| "cucumber"
11
11
| "nightwatch"
12
12
| "webdriverio"
13
- | "mocha" ;
13
+ | "mocha"
14
+ | "junit"
15
+ | "testng" ;
14
16
15
17
export type ConfigMapping = Record <
16
18
SDKSupportedLanguage ,
You can’t perform that action at this time.
0 commit comments