-
Notifications
You must be signed in to change notification settings - Fork 130
Update App.config or appsettings.json file before test execution
Jakub Raczek edited this page Nov 21, 2021
·
1 revision
You can use PowerShell set_AppConfig_for_tests.ps1 script for updating App.config or appsettings.json file before test execution. Script can be found in folder "\scripts" set_AppConfig_for_tests.ps1
Parameters:
- OutDir: Working directory.
- onfigName: Name of config file for update.
- section: Name of section in config file for update.
- keys: Names of keys for update separated by |.
- values:Values of keys for update separated by |, in same order as keys.
- logValues: By default displaying values of keys in logs is disabled. Set it to $true to display key values in logs, pass -logValues as parameter.
- json: By default set to $false. If you use appsettings.json file for configuration settings set it to $true, pass -json as parameter.
.\scripts\set_AppConfig_for_tests ".\Ocaramba.Tests.BrowserStackCrossBrowser\bin\Debug" "Ocaramba.Tests.NUnit.dll.config" "//DriverCapabilities" "browserstack.user|browserstack.key" "key1value|key2value"
In order to display key values in logs, set logValues to $true
.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.BrowserStackCrossBrowser\bin\Debug" "Ocaramba.Tests.NUnit.dll.config" "//DriverCapabilities" "browserstack.user|browserstack.key" "key1value|key2value" -logValues
In case your configuration parameters are located in appsettings.json, set json to $true
.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit" "appsettings.json" "appSettings" "browser|PathToEdgeDriverDirectory" "Edge|C:\\Temp\\Drivers" -logValues -json
- Home
- Getting started
- Parallel tests execution
- MsTest DataDriven tests from Xml and CSV files
- NUnit DataDriven tests from Xml, CSV and Excel files
- Comparing files by NUnit DataDriven tests
- Visual Testing
- Screen shots: full desktop, selenium. PageSource saving
- Verify-asserts without stop tests
- Downloading files
- Helpers
- Override browser profile preferences, install browser extensions, Headless mode
- Debugging Test.Automation framework
- Logging
- Performance measures
- Webdriver Extends
- More common locators
- Selenium-Grid-support
- Advanced Browser Capabilities and Options
- AngularJS synchronization
- Update App.config or appsettings.json
- Cross browser parallel test execution with testing-Cloud-Providers\SeleniumGrid
- Verifying Javascript Errors from browser
- Enabling Performance Log for Chrome
- Azure DevOps Support
- Edge browser Support
- Downloading and running Selenium Grid with Powershell
- Run Ocaramba tests with Docker container
- HTTP auth in Internet explorer
- ExtentReports Support