File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
BrowserStackLocal/BrowserStackLocalIntegrationTests Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ namespace BrowserStackLocalIntegrationTests
11
11
{
12
12
public class IntegrationTests
13
13
{
14
+ static readonly OperatingSystem os = Environment . OSVersion ;
15
+ static readonly string binaryName = os . Platform . ToString ( ) == "Unix" ? "BrowserStackLocal-darwin-x64" : "BrowserStackLocal.exe" ;
14
16
private static string username = Environment . GetEnvironmentVariable ( "BROWSERSTACK_USERNAME" ) ;
15
17
private static string accesskey = Environment . GetEnvironmentVariable ( "BROWSERSTACK_ACCESS_KEY" ) ;
16
18
@@ -31,7 +33,7 @@ void startWithOptions()
31
33
}
32
34
33
35
Assert . DoesNotThrow ( new TestDelegate ( startWithOptions ) ) ;
34
- Process [ ] binaryInstances = Process . GetProcessesByName ( "BrowserStackLocal" ) ;
36
+ Process [ ] binaryInstances = Process . GetProcessesByName ( binaryName ) ;
35
37
Assert . AreNotEqual ( binaryInstances . Length , 0 ) ;
36
38
37
39
IWebDriver driver ;
@@ -52,7 +54,7 @@ void startWithOptions()
52
54
driver . Quit ( ) ;
53
55
local . stop ( ) ;
54
56
55
- binaryInstances = Process . GetProcessesByName ( "BrowserStackLocal" ) ;
57
+ binaryInstances = Process . GetProcessesByName ( binaryName ) ;
56
58
Assert . AreEqual ( binaryInstances . Length , 0 ) ;
57
59
}
58
60
@@ -74,7 +76,7 @@ public void TestBinaryState()
74
76
[ TearDown ]
75
77
public void TestCleanup ( )
76
78
{
77
- foreach ( Process p in Process . GetProcessesByName ( "BrowserStackLocal" ) )
79
+ foreach ( Process p in Process . GetProcessesByName ( binaryName ) )
78
80
{
79
81
p . Kill ( ) ;
80
82
}
You can’t perform that action at this time.
0 commit comments