Skip to content

Commit

Permalink
Adding control of Java test web server from .NET to JSON test config …
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
jimevans committed Jul 11, 2019
1 parent e6f5e3c commit 13b9007
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dotnet/test/common/Environment/EnvironmentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ private EnvironmentManager()
string content = File.ReadAllText(configFile);
TestEnvironment env = JsonConvert.DeserializeObject<TestEnvironment>(content);

bool captureWebServerOutput = TestContext.Parameters.Get<bool>("CaptureWebServerOutput", false);
bool hideWebServerCommandPrompt = TestContext.Parameters.Get<bool>("HideWebServerCommandPrompt", true);
bool captureWebServerOutput = TestContext.Parameters.Get<bool>("CaptureWebServerOutput", env.CaptureWebServerOutput);
bool hideWebServerCommandPrompt = TestContext.Parameters.Get<bool>("HideWebServerCommandPrompt", env.HideWebServerCommandPrompt);
string activeDriverConfig = TestContext.Parameters.Get("ActiveDriverConfig", env.ActiveDriverConfig);
string activeWebsiteConfig = TestContext.Parameters.Get("ActiveWebsiteConfig", env.ActiveWebsiteConfig);
string driverServiceLocation = TestContext.Parameters.Get("DriverServiceLocation", env.DriverServiceLocation);
Expand Down
6 changes: 6 additions & 0 deletions dotnet/test/common/Environment/TestEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ namespace OpenQA.Selenium.Environment
[JsonObject]
class TestEnvironment
{
[JsonProperty]
public bool CaptureWebServerOutput { get; set; }

[JsonProperty]
public bool HideWebServerCommandPrompt { get; set; }

[JsonProperty]
public string DriverServiceLocation { get; set; }

Expand Down
2 changes: 2 additions & 0 deletions dotnet/test/common/appconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"CaptureWebServerOutput": false,
"HideWebServerCommandPrompt": true,
"DriverServiceLocation": "",
"ActiveDriverConfig": "Chrome",
"ActiveWebsiteConfig": "Default",
Expand Down

0 comments on commit 13b9007

Please sign in to comment.