Skip to content

Commit 90107b0

Browse files
author
shalini-90
committed
modified command fro mvn exec
1 parent d1f8720 commit 90107b0

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

setup-and-run.ps1

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,19 @@ Write-Host "Classpath length: $($CLASSPATH.Length)"
3636
# Get absolute path to browserstack.yml
3737
$configPath = Join-Path (Get-Location) "browserstack.yml"
3838

39-
# Create Java argument file (one argument per line) to avoid Windows command line length limit
39+
# Create Java argument file with only javaagent and classpath (the long parts)
4040
$argFile = ".\mvn-exec-args.txt"
4141
Write-Host "Creating argument file: $argFile"
4242
$argFileContent = @"
4343
-javaagent:$BROWSERSTACK_JAR
44-
-Dbrowserstack.config=$configPath
45-
-Dbrowserstack.framework=selenium
46-
-Dbrowserstack.accessibility=true
47-
-Dcucumber.publish.quiet=true
4844
-cp
4945
$CLASSPATH
50-
com.browserstack.tests.RunCucumberTest
5146
"@
5247
Set-Content -Path $argFile -Value $argFileContent
5348

5449
Write-Host ""
5550
Write-Host "Argument file created successfully: $argFile"
5651
Write-Host ""
5752
Write-Host "Now run the following command:"
58-
Write-Host " mvn exec:exec '-Dexec.executable=java' `"-Dexec.args=@$argFile`""
59-
Write-Host ""
60-
Write-Host "Or use this syntax:"
61-
Write-Host " mvn exec:exec -D exec.executable=java -D exec.args=@$argFile"
53+
Write-Host " mvn exec:exec '-Dexec.executable=java' '-Dexec.args=@$argFile -Dbrowserstack.config=$configPath -Dbrowserstack.framework=selenium -Dbrowserstack.accessibility=true -Dcucumber.publish.quiet=true com.browserstack.tests.RunCucumberTest'"
6254
Write-Host ""

0 commit comments

Comments
 (0)