Closed veebs closed 1 year ago
default.env
local.env
{ "settings": [ { "name": "TestUser", "value": "jim" }, { "name": "TestPassword", "value": "xxx" } ] }
*.env
In the data column of test steps and routines, settings can be used as follows
{TestUser}
For dotnet, create a static class that loads all the settings from then enviorment variable
public static class EnvironmentSettings { public static readonly string TestUser = Environment.GetEnvironmentVariable("TestUser"); }
For data values, replace {TestUser} with EnvironmentSettings.TestUser
EnvironmentSettings.TestUser
Generate a file based on the current OS to set the enviornment variable and then run dotnet test as per the above example
dotnet test
run.sh
run.bat
env*.json
run.default.env.sh
run.local.env.sh
Hi @khanh-van-zapcentral , @veebs , please help me review this PR https://github.com/rockmelonqa/rockmelonqa-ide/pull/162
Requirement
New File Type
default.env
- default and can be source controlledlocal.env
- overrides that may or may not be source controlled*.env
Use of Settings
In the data column of test steps and routines, settings can be used as follows
Code Generation
For dotnet, create a static class that loads all the settings from then enviorment variable
For data values, replace {TestUser} with
EnvironmentSettings.TestUser
Generate a file based on the current OS to set the enviornment variable and then run
dotnet test
as per the above examplerun.sh
and if windows, createrun.bat
env*.json
file founddefault.env
->run.default.env.sh
local.env
->run.local.env.sh
Running Tests
*.env
file to use*.env
file, do not show the drop down