Launch Test with Web Runner
-WebRunner is the component to run automated test and provided rich XML report.
+
WebRunner is the component to run automated tests and provides rich XML reports.
Based on the programming language used to build a test automation solution, the command-line has a little difference.
However, all behaviors and arguments remain the same.
Warning
-Spacing characters are not accepted as parameter values. Parameter with space must be enclosed in double-quotes.
+Spacing characters are not accepted as parameter values. Parameters with spaces must be enclosed in double-quotes.
-
@@ -97,18 +97,21 @@
Warning
Prerequisites
-To run tests build with WebEngine Framework, you have to provide compiled test automation solution.
+To run tests built with WebEngine Framework, you have to provide a compiled test automation solution and specify the browser type.
+Required Parameters
-
-
-a:<testproject>: the filename or full path of compiled test project: DLL library for .NET.
+-a:<testproject>: (.NET only) The filename or full path of the compiled test project DLL library.
+-browser:<browser-type>: The browser or platform to run the tests on. See Browser Types for supported values.
If your solution use Data-Driven approach, it is required to provide at least one of following files:
+Data-Driven Testing
+If your solution uses a Data-Driven approach, you can provide the following files:
-
-
-data:<testdata>: Test Data to be used for data-driven test execution, in XML format. The file can be exported viaExcel Add-in
--env:<env_variable>: Environment Variables in XML format, to store test environment related test data, such as URLs, Hostnames or Credentials.
+-data:<testdata>: Test Data to be used for data-driven test execution, in XML format. The file can be exported via theExcel Add-in. If not provided, tests will run without test data.
+-env:<env_variable>: Environment Variables in XML format, to store test environment-related test data, such as URLs, Hostnames, or Credentials.
Examples
Run test on desktop browsers
-For following command line launches the solution in Firefox browser and generate test reports in C:\Temp
The following command line launches the solution in the Firefox browser and generates test reports in C:\Temp
-
@@ -130,7 +133,7 @@
Run test on desktop browsers
Run webapp test on Android Emulator
-Following command line launches same test under emulated Android device (requires Android Emulator + Appium Server on local) using Chrome browser.
The following command line launches the same test under an emulated Android device (requires Android Emulator + Appium Server on local) using the Chrome browser.
-
@@ -152,8 +155,12 @@
Run webapp test on Android Emulator
Run app test on Selenium compatible Device Cloud
-Following command line installs the application package, then launches test under iPhone 12, using provided device cloud.
WebRunner.exe "-a:AppProject.dll" "-data:Data.xml" "-env:Staging.xml" -platform:iOS -browser:IOSNative "-device:iPhone 12" "-grid:http://seleniumgrid.com/wd/hub" "-appId:C:\app_under_test.ipa"
+The following command line installs the application package, then launches the test under iPhone 12, using the provided device cloud.
+WebRunner.exe "-a:AppProject.dll" "-data:Data.xml" "-env:Staging.xml" "-platform:iOS" "-browser:IOSNative" "-device:iPhone 12" "-grid:http://seleniumgrid.com/wd/hub" "-appId:C:\app_under_test.ipa"
+
+Encrypt sensitive data
+To encrypt sensitive data (such as passwords) for use in test data files:
+WebRunner.exe "-encrypt" "MySecretPassword" "-encryptionKey:MyEncryptionKey"
Optional parameters
@@ -166,40 +173,102 @@ Note
Please refer to Test Configuration JAVA for Java
-Commun parameters
+Common parameters
-browser:<browser>
-Specifies the browser on which to run test. see: BrowserType.
+Required. Specifies the browser or platform on which to run the test. Supported values:
+
+- Desktop Browsers:
+
+Chrome - Google Chrome
+Firefox - Mozilla Firefox
+Edge - Microsoft Edge (Chromium-based)
+
+
+- Mobile Browsers:
+
+Safari - iOS Safari browser
+Chrome - Google Chrome
+
+
+- Mobile Native Applications:
+
+IOSNative - iOS native application
+AndroidNative - Android native application
+
+
+
+
+Note
+Internet Explorer is no longer supported. Please use Edge or other modern browsers.
+
+See: BrowserType for more details.
-platform:<platform>
-Specifies The platform for test execution: see: Platform. Default value is Windows.
+Specifies the platform for test execution. Supported values:
+
+Windows (default)
+Android
+iOS
+
+See: Platform for more details.
-outputDir:<outputFolder>
-Specifies the folder to store output of test execution and test report. This parameter is can be defined in appsetting.json for C# and application.yml for JAVA.
+Specifies the folder to store the output of test execution and test reports. This parameter can also be defined in appsettings.json for C# and application.yml for Java.
+-u
+Saves reports to a unique folder suffixed by date and time (format: yyyyMMdd_hhmmss). When this flag is present, each test run will create a separate timestamped folder, preventing reports from being overwritten.
-m
-Specifies the manual debug mode. Use this mode for debugging test scenarios locally. When the test is failed test will pause for manual intervention before clean-up process.
+Specifies manual debug mode. Use this mode for debugging test scenarios locally. When a test fails, execution will pause for manual intervention before the clean-up process.
+-h or -hide
+(Windows only) Hides the console window during test execution.
-junit:<junit-report-path>
-In additional of default XML report, generates a JUnit 2.6 compliant test report. Useful to publish test result to a Continuous Integration Platform
+In addition to the default XML report, generates a JUnit 2.6 compliant test report. Useful for publishing test results to Continuous Integration platforms.
-html:<html-report-path>
-In additional of default XML report, generates a HTML test report. Test report will be generated in the given folder. HTML report contains also css, javascript and screenshot files. If you want the share the report, you have to copy the whole folder.
+In addition to the default XML report, generates an HTML test report. The test report will be generated in the given folder. The HTML report contains CSS, JavaScript, and screenshot files. If you want to share the report, you have to copy the whole folder.
-showReport
-Launches Report Viewer after test execution.
+Launches Report Viewer after test execution to display the test results.
+-encryptionKey:<key>
+Specifies the encryption key to use when decrypting sensitive data in test data files. Use with the -encrypt command to encrypt sensitive values.
Parameters for Mobile testing
-To run tests on Mobile device, -platform, you should specify the following arguments Android or iOS.
+To run tests on mobile devices, specify -platform as Android or iOS, and use the following additional arguments:
+-appId:<application-path>
+Required for native mobile apps. Specifies the path to the application package to be tested:
+
+- For Android:
.apk or .aab file
+- For iOS:
.ipa or .app file
+
+This parameter is mandatory when using -browser:AndroidNative or -browser:IOSNative.
-grid:<gridUrl>
-Indicates the Selenium Grid to connect to device cloud. Default value is http://localhost:4723/wd/hub for local Appium Server
-If you are using cloud-based device cloud, please refer to service providers documentation.
-If the argument is provided, option desktopGrid will be automatically set to true
+Indicates the Selenium Grid URL to connect to a device cloud. Default value is http://localhost:4723/wd/hub for local Appium Server.
+If you are using a cloud-based device cloud, please refer to your service provider's documentation.
+
+Note
+When the -grid argument is provided, the GridForDesktop option will be automatically set to true, enabling Selenium Grid for both mobile and desktop tests.
+
-desktopGrid
-This option activates the usage of Selenium Grid for Web Desktop tests. If the value is false, the framework only use selenium grid for mobile based tests.
+Activates the usage of Selenium Grid for Web Desktop tests. When set, desktop browser tests will also run through the specified Selenium Grid.
-username:<username>
-Indicates the username to be used for Selenium Grid authentication.
+Specifies the username for Selenium Grid authentication. Required by some cloud-based device providers.
-password:<password>
-Indicates the password to be used for Selenium Grid authentication.
+Specifies the password for Selenium Grid authentication. Required by some cloud-based device providers.
+
+Tip
+Use the -encrypt command to encrypt your password before storing it in configuration files.
+
-device:<deviceName>
-Indicates the device name for device selection. for example: iPhone Xs, Huawei P30. Refers your cloud provider.
+Specifies the device name for device selection. Examples: iPhone Xs, Huawei P30, Emulator. Refer to your cloud provider's documentation for available device names.
-osVersion:<version>
-Indicate the version of the OS for device selection. for example: 14.1, 9.0. Refers your cloud provider.
+Specifies the version of the operating system for device selection. Examples: 14.1, 9.0. Refer to your cloud provider's documentation for available OS versions.
+Special Commands
+-encrypt
+Encrypts a string value for secure storage in test data files. This must be the first argument.
+Syntax:
+WebRunner.exe "-encrypt" "<data-to-encrypt>" "-encryptionKey:<your-key>"
+
+Example:
+WebRunner.exe "-encrypt" "MyPassword123" "-encryptionKey:MySecretKey"
+
+The encrypted value will be displayed in the console and can be used in your test data files.
Where to find WebRunner package?
-WebRunner package is installed via NuGet Package (.NET) or Maven (Java).
-After compilation of your test automation project, it will be found in project output folder.
+The WebRunner package is installed via NuGet Package (.NET) or Maven (Java).
+After compilation of your test automation project, it will be found in the project output folder.
@@ -229,7 +298,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/index.html b/docs/index.html
index dfde572..c6966ce 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -5,9 +5,9 @@
- AXA WebEngine Framework | AXA WebEngine Test Framework
+ AXA WebEngine Framework | AXA - WebEngine Test Framework
-
+
@@ -167,7 +167,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/app-elements.html b/docs/tutorials/app-elements.html
index 3c50d62..86d4a87 100644
--- a/docs/tutorials/app-elements.html
+++ b/docs/tutorials/app-elements.html
@@ -5,9 +5,9 @@
- Identify Mobile App UI Elements | AXA WebEngine Test Framework
+ Identify Mobile App UI Elements | AXA - WebEngine Test Framework
-
+
@@ -179,7 +179,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/appium-driver.html b/docs/tutorials/appium-driver.html
index d6c6c31..d9a726e 100644
--- a/docs/tutorials/appium-driver.html
+++ b/docs/tutorials/appium-driver.html
@@ -5,9 +5,9 @@
- WebDriver for MobileApp testing | AXA WebEngine Test Framework
+ WebDriver for MobileApp testing | AXA - WebEngine Test Framework
-
+
@@ -150,7 +150,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/ci-cd.html b/docs/tutorials/ci-cd.html
index aae5096..845c9c1 100644
--- a/docs/tutorials/ci-cd.html
+++ b/docs/tutorials/ci-cd.html
@@ -5,9 +5,9 @@
- Integrate your tests into a DevOps environment | AXA WebEngine Test Framework
+ Integrate your tests into a DevOps environment | AXA - WebEngine Test Framework
-
+
@@ -119,7 +119,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/data-driven-cs.html b/docs/tutorials/data-driven-cs.html
index 1cce711..b46f16b 100644
--- a/docs/tutorials/data-driven-cs.html
+++ b/docs/tutorials/data-driven-cs.html
@@ -5,9 +5,9 @@
- Data-Driven testing Approach (C#/.NET) | AXA WebEngine Test Framework
+ Data-Driven testing Approach (C#/.NET) | AXA - WebEngine Test Framework
-
+
@@ -676,7 +676,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/data-driven-java.html b/docs/tutorials/data-driven-java.html
index 0e20d17..17c0619 100644
--- a/docs/tutorials/data-driven-java.html
+++ b/docs/tutorials/data-driven-java.html
@@ -5,9 +5,9 @@
- Data-Driven testing Approach (Java/Spring boot) | AXA WebEngine Test Framework
+ Data-Driven testing Approach (Java/Spring boot) | AXA - WebEngine Test Framework
-
+
@@ -462,7 +462,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/empty.html b/docs/tutorials/empty.html
index 3a07e3f..52f392a 100644
--- a/docs/tutorials/empty.html
+++ b/docs/tutorials/empty.html
@@ -5,9 +5,9 @@
- | AXA WebEngine Test Framework
+ | AXA - WebEngine Test Framework
-
+
@@ -99,7 +99,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/gherkin-cs.html b/docs/tutorials/gherkin-cs.html
index 3cf8934..5766f5e 100644
--- a/docs/tutorials/gherkin-cs.html
+++ b/docs/tutorials/gherkin-cs.html
@@ -5,9 +5,9 @@
- Writing test cases - Gherkin Approach (C#/.NET) | AXA WebEngine Test Framework
+ Writing test cases - Gherkin Approach (C#/.NET) | AXA - WebEngine Test Framework
-
+
@@ -145,6 +145,7 @@ Step 5: Implementation
using AxaFrance.WebEngine.Web;
using NUnit.Framework;
using OpenQA.Selenium;
+using Reqnroll;
namespace Samples.Gherkin.StepDefinitions
{
@@ -177,7 +178,7 @@ Step 5: Implementation
//save test report with embedded accessibility test result.
TestSuiteReport tsr = new TestSuiteReport();
tsr.TestResult.Add(tcr);
- var filename = tsr.SaveAs(Path.GetRandomFileName(), "test-report", false);
+ var filename = tsr.SaveAs(Path.GetRandomFileName(), "test-report", false, out string reportFolder);
Console.WriteLine($"Report saved to {filename}");
}
@@ -272,7 +273,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/gherkin-java.html b/docs/tutorials/gherkin-java.html
index b27e706..25ebac5 100644
--- a/docs/tutorials/gherkin-java.html
+++ b/docs/tutorials/gherkin-java.html
@@ -5,9 +5,9 @@
- Writing test cases - Gherkin Approach (Java / Spring boot) | AXA WebEngine Test Framework
+ Writing test cases - Gherkin Approach (Java / Spring boot) | AXA - WebEngine Test Framework
-
+
@@ -343,7 +343,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/intro.html b/docs/tutorials/intro.html
index 7234992..37df347 100644
--- a/docs/tutorials/intro.html
+++ b/docs/tutorials/intro.html
@@ -5,9 +5,9 @@
- Tutorials & Samples | AXA WebEngine Test Framework
+ Tutorials & Samples | AXA - WebEngine Test Framework
-
+
@@ -155,7 +155,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/keyword-driven-cs.html b/docs/tutorials/keyword-driven-cs.html
index ac76074..b2ff5f4 100644
--- a/docs/tutorials/keyword-driven-cs.html
+++ b/docs/tutorials/keyword-driven-cs.html
@@ -5,9 +5,9 @@
- Keyword-Driven testing Approach (C#/.NET) | AXA WebEngine Test Framework
+ Keyword-Driven testing Approach (C#/.NET) | AXA - WebEngine Test Framework
-
+
@@ -528,7 +528,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/keyword-driven-java.html b/docs/tutorials/keyword-driven-java.html
index d10482b..b4a8295 100644
--- a/docs/tutorials/keyword-driven-java.html
+++ b/docs/tutorials/keyword-driven-java.html
@@ -5,9 +5,9 @@
- Keyword-Driven testing Approach (Java/Spring boot) | AXA WebEngine Test Framework
+ Keyword-Driven testing Approach (Java/Spring boot) | AXA - WebEngine Test Framework
-
+
@@ -623,7 +623,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/keyworddriven.html b/docs/tutorials/keyworddriven.html
index 8b09100..013e0e9 100644
--- a/docs/tutorials/keyworddriven.html
+++ b/docs/tutorials/keyworddriven.html
@@ -5,9 +5,9 @@
- Keyword-driven Testing approach | AXA WebEngine Test Framework
+ Keyword-driven Testing approach | AXA - WebEngine Test Framework
-
+
@@ -128,7 +128,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/linear-script-cs.html b/docs/tutorials/linear-script-cs.html
index cf5f923..923ffea 100644
--- a/docs/tutorials/linear-script-cs.html
+++ b/docs/tutorials/linear-script-cs.html
@@ -5,9 +5,9 @@
- Linear Scripting Approach (C#/.NET) | AXA WebEngine Test Framework
+ Linear Scripting Approach (C#/.NET) | AXA - WebEngine Test Framework
-
+
@@ -277,7 +277,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/linear-script-java.html b/docs/tutorials/linear-script-java.html
index 00c03ff..bb543cf 100644
--- a/docs/tutorials/linear-script-java.html
+++ b/docs/tutorials/linear-script-java.html
@@ -5,9 +5,9 @@
- Linear Scripting Approach (Java) | AXA WebEngine Test Framework
+ Linear Scripting Approach (Java) | AXA - WebEngine Test Framework
-
+
@@ -350,7 +350,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/page-model.html b/docs/tutorials/page-model.html
index 8cc1f6a..2ef9530 100644
--- a/docs/tutorials/page-model.html
+++ b/docs/tutorials/page-model.html
@@ -5,9 +5,9 @@
- Organize UI Elements With PageModel | AXA WebEngine Test Framework
+ Organize UI Elements With PageModel | AXA - WebEngine Test Framework
-
+
@@ -125,7 +125,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/secure-password.html b/docs/tutorials/secure-password.html
index 66a6d19..f7480e6 100644
--- a/docs/tutorials/secure-password.html
+++ b/docs/tutorials/secure-password.html
@@ -5,9 +5,9 @@
- Secure Passwords | AXA WebEngine Test Framework
+ Secure Passwords | AXA - WebEngine Test Framework
-
+
@@ -151,7 +151,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/toc-concepts.html b/docs/tutorials/toc-concepts.html
index d5cf797..9081aca 100644
--- a/docs/tutorials/toc-concepts.html
+++ b/docs/tutorials/toc-concepts.html
@@ -5,9 +5,9 @@
- Basic Concepts | AXA WebEngine Test Framework
+ Basic Concepts | AXA - WebEngine Test Framework
-
+
@@ -107,7 +107,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/toc-sample.html b/docs/tutorials/toc-sample.html
index 2d588ab..ee22f11 100644
--- a/docs/tutorials/toc-sample.html
+++ b/docs/tutorials/toc-sample.html
@@ -5,9 +5,9 @@
- Examples Projects | AXA WebEngine Test Framework
+ Examples Projects | AXA - WebEngine Test Framework
-
+
@@ -123,7 +123,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/toc-workaround.html b/docs/tutorials/toc-workaround.html
index 656d948..5a0c678 100644
--- a/docs/tutorials/toc-workaround.html
+++ b/docs/tutorials/toc-workaround.html
@@ -5,9 +5,9 @@
- Tutorials | AXA WebEngine Test Framework
+ Tutorials | AXA - WebEngine Test Framework
-
+
@@ -98,7 +98,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/web-driver.html b/docs/tutorials/web-driver.html
index 2ff10bb..4bbb151 100644
--- a/docs/tutorials/web-driver.html
+++ b/docs/tutorials/web-driver.html
@@ -5,9 +5,9 @@
- WebDriver for Web based tests | AXA WebEngine Test Framework
+ WebDriver for Web based tests | AXA - WebEngine Test Framework
-
+
@@ -155,7 +155,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/docs/tutorials/web-elements.html b/docs/tutorials/web-elements.html
index 1f48586..8ca6617 100644
--- a/docs/tutorials/web-elements.html
+++ b/docs/tutorials/web-elements.html
@@ -5,9 +5,9 @@
- Identify Web Elements | AXA WebEngine Test Framework
+ Identify Web Elements | AXA - WebEngine Test Framework
-
+
@@ -183,7 +183,7 @@ In this article
Back to top
- Copyright ® 2016-2024 AXA France, All rights reserved.
+ Copyright ® 2016-2025 AXA France, All rights reserved.
diff --git a/src/AxaFrance.WebEngine.Doc/articles/webrunner.md b/src/AxaFrance.WebEngine.Doc/articles/webrunner.md
index 9de5258..09600f1 100644
--- a/src/AxaFrance.WebEngine.Doc/articles/webrunner.md
+++ b/src/AxaFrance.WebEngine.Doc/articles/webrunner.md
@@ -1,10 +1,10 @@
# Launch Test with Web Runner
-`WebRunner` is the component to run automated test and provided rich XML report.
+`WebRunner` is the component to run automated tests and provides rich XML reports.
Based on the programming language used to build a test automation solution, the command-line has a little difference.
However, all behaviors and arguments remain the same.
> [!WARNING]
-> Spacing characters are not accepted as parameter values. Parameter with space must be enclosed in double-quotes.
+> Spacing characters are not accepted as parameter values. Parameters with spaces must be enclosed in double-quotes.
# [.NET](#tab/netcore)
```batch
@@ -17,17 +17,21 @@ java -jar MyProject.jar [-data:] [-env:] [-browser:`: the filename or full path of compiled test project: DLL library for .NET.
+To run tests built with WebEngine Framework, you have to provide a compiled test automation solution and specify the browser type.
-If your solution use Data-Driven approach, it is required to provide at least one of following files:
-* `-data:`: Test Data to be used for data-driven test execution, in XML format. The file can be exported via `Excel Add-in`
-* `-env:`: Environment Variables in XML format, to store test environment related test data, such as URLs, Hostnames or Credentials.
+### Required Parameters
+* `-a:`: *(.NET only)* The filename or full path of the compiled test project DLL library.
+* `-browser:`: The browser or platform to run the tests on. See [Browser Types](#-browserbrowser) for supported values.
+
+### Data-Driven Testing
+If your solution uses a Data-Driven approach, you can provide the following files:
+* `-data:`: Test Data to be used for data-driven test execution, in XML format. The file can be exported via the `Excel Add-in`. If not provided, tests will run without test data.
+* `-env:`: Environment Variables in XML format, to store test environment-related test data, such as URLs, Hostnames, or Credentials.
### Examples
#### Run test on desktop browsers
-For following command line launches the solution in `Firefox` browser and generate test reports in `C:\Temp`
+The following command line launches the solution in the `Firefox` browser and generates test reports in `C:\Temp`
# [.NET](#tab/netcore)
```batch
@@ -42,7 +46,7 @@ java -jar MyProject.jar "-data:Data.xml" "-env:Staging.xml" "-browser:Firefox" "
#### Run webapp test on Android Emulator
-Following command line launches same test under emulated `Android` device (requires Android Emulator + Appium Server on local) using `Chrome` browser.
+The following command line launches the same test under an emulated `Android` device (requires Android Emulator + Appium Server on local) using the `Chrome` browser.
# [.NET](#tab/netcore)
```batch
@@ -56,9 +60,15 @@ java -jar MyProject.jar "-data:Data.xml" "-env:Env.xml" "-platform:Android" "-br
***
#### Run app test on Selenium compatible Device Cloud
-Following command line installs the application package, then launches test under `iPhone 12`, using provided device cloud.
+The following command line installs the application package, then launches the test under `iPhone 12`, using the provided device cloud.
+```batch
+WebRunner.exe "-a:AppProject.dll" "-data:Data.xml" "-env:Staging.xml" "-platform:iOS" "-browser:IOSNative" "-device:iPhone 12" "-grid:http://seleniumgrid.com/wd/hub" "-appId:C:\app_under_test.ipa"
+```
+
+#### Encrypt sensitive data
+To encrypt sensitive data (such as passwords) for use in test data files:
```batch
-WebRunner.exe "-a:AppProject.dll" "-data:Data.xml" "-env:Staging.xml" -platform:iOS -browser:IOSNative "-device:iPhone 12" "-grid:http://seleniumgrid.com/wd/hub" "-appId:C:\app_under_test.ipa"
+WebRunner.exe "-encrypt" "MySecretPassword" "-encryptionKey:MyEncryptionKey"
```
@@ -71,49 +81,110 @@ WebRunner.exe "-a:AppProject.dll" "-data:Data.xml" "-env:Staging.xml" -platform:
> Please refer to [Test Configuration JAVA](appsettings-java.md) for Java
-### Commun parameters
+### Common parameters
+
#### -browser:\
-Specifies the browser on which to run test. see: .
+**Required.** Specifies the browser or platform on which to run the test. Supported values:
+- **Desktop Browsers:**
+ - `Chrome` - Google Chrome
+ - `Firefox` - Mozilla Firefox
+ - `Edge` - Microsoft Edge (Chromium-based)
+- **Mobile Browsers:**
+ - `Safari` - iOS Safari browser
+ - `Chrome` - Google Chrome
+- **Mobile Native Applications:**
+ - `IOSNative` - iOS native application
+ - `AndroidNative` - Android native application
+
+> [!NOTE]
+> Internet Explorer is no longer supported. Please use Edge or other modern browsers.
+
+See: for more details.
+
#### -platform:\
-Specifies The platform for test execution: see: . Default value is `Windows`.
+Specifies the platform for test execution. Supported values:
+- `Windows` (default)
+- `Android`
+- `iOS`
+
+See: for more details.
+
#### -outputDir:\
-Specifies the folder to store output of test execution and test report. This parameter is can be defined in `appsetting.json` for C# and `application.yml` for JAVA.
+Specifies the folder to store the output of test execution and test reports. This parameter can also be defined in `appsettings.json` for C# and `application.yml` for Java.
+
+#### -u
+Saves reports to a unique folder suffixed by date and time (format: `yyyyMMdd_hhmmss`). When this flag is present, each test run will create a separate timestamped folder, preventing reports from being overwritten.
#### -m
-Specifies the manual debug mode. Use this mode for debugging test scenarios locally. When the test is failed test will pause for manual intervention before clean-up process.
+Specifies manual debug mode. Use this mode for debugging test scenarios locally. When a test fails, execution will pause for manual intervention before the clean-up process.
+
+#### -h or -hide
+*(Windows only)* Hides the console window during test execution.
#### -junit:\
-In additional of default XML report, generates a JUnit 2.6 compliant test report. Useful to publish test result to a Continuous Integration Platform
+In addition to the default XML report, generates a JUnit 2.6 compliant test report. Useful for publishing test results to Continuous Integration platforms.
#### -html:\
-In additional of default XML report, generates a HTML test report. Test report will be generated in the given folder. HTML report contains also css, javascript and screenshot files. If you want the share the report, you have to copy the whole folder.
+In addition to the default XML report, generates an HTML test report. The test report will be generated in the given folder. The HTML report contains CSS, JavaScript, and screenshot files. If you want to share the report, you have to copy the whole folder.
#### -showReport
-Launches `Report Viewer` after test execution.
+Launches `Report Viewer` after test execution to display the test results.
+
+#### -encryptionKey:\
+Specifies the encryption key to use when decrypting sensitive data in test data files. Use with the `-encrypt` command to encrypt sensitive values.
### Parameters for Mobile testing
-To run tests on Mobile device, `-platform`, you should specify the following arguments `Android` or `iOS`.
+To run tests on mobile devices, specify `-platform` as `Android` or `iOS`, and use the following additional arguments:
+
+#### -appId:\
+**Required for native mobile apps.** Specifies the path to the application package to be tested:
+- For Android: `.apk` or `.aab` file
+- For iOS: `.ipa` or `.app` file
+
+This parameter is mandatory when using `-browser:AndroidNative` or `-browser:IOSNative`.
#### -grid:\
-Indicates the Selenium Grid to connect to device cloud. Default value is `http://localhost:4723/wd/hub` for local Appium Server
-If you are using cloud-based device cloud, please refer to service providers documentation.
-If the argument is provided, option `desktopGrid` will be automatically set to `true`
+Indicates the Selenium Grid URL to connect to a device cloud. Default value is `http://localhost:4723/wd/hub` for local Appium Server.
+If you are using a cloud-based device cloud, please refer to your service provider's documentation.
+
+> [!NOTE]
+> When the `-grid` argument is provided, the `GridForDesktop` option will be automatically set to `true`, enabling Selenium Grid for both mobile and desktop tests.
#### -desktopGrid
-This option activates the usage of Selenium Grid for Web Desktop tests. If the value is false, the framework only use selenium grid for mobile based tests.
+Activates the usage of Selenium Grid for Web Desktop tests. When set, desktop browser tests will also run through the specified Selenium Grid.
#### -username:\
-Indicates the username to be used for Selenium Grid authentication.
+Specifies the username for Selenium Grid authentication. Required by some cloud-based device providers.
#### -password:\
-Indicates the password to be used for Selenium Grid authentication.
+Specifies the password for Selenium Grid authentication. Required by some cloud-based device providers.
+
+> [!TIP]
+> Use the `-encrypt` command to encrypt your password before storing it in configuration files.
#### -device:\
-Indicates the device name for device selection. for example: `iPhone Xs`, `Huawei P30`. Refers your cloud provider.
+Specifies the device name for device selection. Examples: `iPhone Xs`, `Huawei P30`, `Emulator`. Refer to your cloud provider's documentation for available device names.
#### -osVersion:\
-Indicate the version of the OS for device selection. for example: `14.1`, `9.0`. Refers your cloud provider.
+Specifies the version of the operating system for device selection. Examples: `14.1`, `9.0`. Refer to your cloud provider's documentation for available OS versions.
+
+### Special Commands
+
+#### -encrypt
+Encrypts a string value for secure storage in test data files. This must be the first argument.
+
+**Syntax:**
+```batch
+WebRunner.exe "-encrypt" "" "-encryptionKey:"
+```
+
+**Example:**
+```batch
+WebRunner.exe "-encrypt" "MyPassword123" "-encryptionKey:MySecretKey"
+```
+
+The encrypted value will be displayed in the console and can be used in your test data files.
### Where to find WebRunner package?
-WebRunner package is installed via NuGet Package (.NET) or Maven (Java).
-After compilation of your test automation project, it will be found in project output folder.
+The WebRunner package is installed via NuGet Package (.NET) or Maven (Java).
+After compilation of your test automation project, it will be found in the project output folder.
diff --git a/src/AxaFrance.WebEngine.ExcelUI/FrmRun.Designer.cs b/src/AxaFrance.WebEngine.ExcelUI/FrmRun.Designer.cs
index 5dcae86..489c24f 100644
--- a/src/AxaFrance.WebEngine.ExcelUI/FrmRun.Designer.cs
+++ b/src/AxaFrance.WebEngine.ExcelUI/FrmRun.Designer.cs
@@ -43,7 +43,6 @@ private void InitializeComponent()
this.rbEdge = new System.Windows.Forms.RadioButton();
this.rbChrome = new System.Windows.Forms.RadioButton();
this.rbFirefox = new System.Windows.Forms.RadioButton();
- this.rbIE = new System.Windows.Forms.RadioButton();
this.txtDeviceName = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtAppPackage = new System.Windows.Forms.TextBox();
@@ -117,7 +116,9 @@ private void InitializeComponent()
//
this.rbEdge.BackgroundImage = global::AxaFrance.WebEngine.ExcelUI.Properties.Resources.edge;
resources.ApplyResources(this.rbEdge, "rbEdge");
+ this.rbEdge.Checked = true;
this.rbEdge.Name = "rbEdge";
+ this.rbEdge.TabStop = true;
this.rbEdge.UseVisualStyleBackColor = false;
//
// rbChrome
@@ -134,15 +135,6 @@ private void InitializeComponent()
this.rbFirefox.Name = "rbFirefox";
this.rbFirefox.UseVisualStyleBackColor = false;
//
- // rbIE
- //
- this.rbIE.BackgroundImage = global::AxaFrance.WebEngine.ExcelUI.Properties.Resources.ie;
- resources.ApplyResources(this.rbIE, "rbIE");
- this.rbIE.Checked = true;
- this.rbIE.Name = "rbIE";
- this.rbIE.TabStop = true;
- this.rbIE.UseVisualStyleBackColor = false;
- //
// txtDeviceName
//
resources.ApplyResources(this.txtDeviceName, "txtDeviceName");
@@ -218,7 +210,6 @@ private void InitializeComponent()
this.Controls.Add(this.btnStart);
this.Controls.Add(this.rbChrome);
this.Controls.Add(this.rbFirefox);
- this.Controls.Add(this.rbIE);
this.Controls.Add(this.lblSelectedTests);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
@@ -237,7 +228,6 @@ private void InitializeComponent()
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lblSelectedTests;
- private System.Windows.Forms.RadioButton rbIE;
private System.Windows.Forms.RadioButton rbFirefox;
private System.Windows.Forms.RadioButton rbChrome;
private System.Windows.Forms.Button btnStart;
diff --git a/src/AxaFrance.WebEngine.ExcelUI/FrmRun.cs b/src/AxaFrance.WebEngine.ExcelUI/FrmRun.cs
index 1134e83..8926c9d 100644
--- a/src/AxaFrance.WebEngine.ExcelUI/FrmRun.cs
+++ b/src/AxaFrance.WebEngine.ExcelUI/FrmRun.cs
@@ -62,7 +62,7 @@ private string BuildParameter(BrowserType browser, string assembly, string platf
string testdata = Ribbon.TestDataFile;
- string parameters = string.Format(@"-a:{0} ""-data:{1}"" ""-env:{2}"" ""-browser:{3}""",
+ string parameters = string.Format(@"-a:{0} ""-data:{1}"" ""-env:{2}"" ""-browser:{3}"" -u",
assembly,
testdata,
env,
@@ -149,11 +149,7 @@ private BrowserType GetSelectedBrowser(out string platform, out string appid, ou
{
BrowserType browser;
platform = appid = device = null;
- if (rbIE.Checked)
- {
- browser = BrowserType.InternetExplorer;
- }
- else if (rbFirefox.Checked)
+ if (rbFirefox.Checked)
{
browser = BrowserType.Firefox;
}
@@ -211,9 +207,6 @@ private void FrmRun_Load(object sender, EventArgs e)
lblSelectedTests.Text = message;
switch (Ribbon.Settings.Browser)
{
- case BrowserType.InternetExplorer:
- rbIE.Checked = true;
- break;
case BrowserType.Firefox:
rbFirefox.Checked = true;
break;
diff --git a/src/AxaFrance.WebEngine.ExcelUI/FrmRun.resx b/src/AxaFrance.WebEngine.ExcelUI/FrmRun.resx
index e94c24c..9ee7ef7 100644
--- a/src/AxaFrance.WebEngine.ExcelUI/FrmRun.resx
+++ b/src/AxaFrance.WebEngine.ExcelUI/FrmRun.resx
@@ -126,10 +126,14 @@
Segoe UI Light, 11.25pt
- 24, 9
+ 42, 16
+
+
+
+ 5, 0, 5, 0
- 124, 20
+ 223, 37
0
@@ -147,7 +151,7 @@
$this
- 20
+ 19
True
@@ -156,10 +160,13 @@
Segoe UI Light, 11.25pt
- 26, 88
+ 46, 154
+
+
+ 5, 0, 5, 0
- 168, 20
+ 302, 37
1
@@ -177,7 +184,7 @@
$this
- 19
+ 18
True
@@ -186,10 +193,13 @@
Segoe UI Light, 11.25pt
- 23, 333
+ 40, 583
+
+
+ 5, 0, 5, 0
- 60, 20
+ 112, 37
2
@@ -207,13 +217,16 @@
$this
- 18
+ 17
- 65, 43
+ 114, 75
+
+
+ 5, 0, 5, 0
- 473, 42
+ 828, 74
3
@@ -231,9 +244,8 @@
$this
- 17
+ 16
-
Flat
@@ -241,10 +253,13 @@
Segoe UI Light, 11.25pt
- 644, 373
+ 1127, 653
+
+
+ 5, 5, 5, 5
- 129, 34
+ 226, 60
7
@@ -268,10 +283,13 @@
True
- 92, 354
+ 161, 620
+
+
+ 5, 5, 5, 5
- 267, 19
+ 466, 34
13
@@ -295,10 +313,13 @@
Zoom
- 303, 200
+ 530, 350
+
+
+ 5, 5, 5, 5
- 90, 64
+ 158, 112
17
@@ -319,10 +340,13 @@
Zoom
- 180, 200
+ 315, 350
+
+
+ 5, 5, 5, 5
- 90, 64
+ 158, 112
16
@@ -343,10 +367,13 @@
Zoom
- 549, 111
+ 746, 196
+
+
+ 5, 5, 5, 5
- 90, 64
+ 158, 112
14
@@ -367,10 +394,13 @@
Zoom
- 427, 111
+ 532, 196
+
+
+ 5, 5, 5, 5
- 90, 64
+ 158, 112
6
@@ -391,10 +421,13 @@
Zoom
- 303, 111
+ 315, 196
+
+
+ 5, 5, 5, 5
- 90, 64
+ 158, 112
5
@@ -411,35 +444,14 @@
15
-
- Zoom
-
-
- 180, 111
-
-
- 90, 64
-
-
- 4
-
-
- rbIE
-
-
- System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 16
-
- 92, 286
+ 161, 500
+
+
+ 5, 5, 5, 5
- 176, 23
+ 305, 35
18
@@ -466,10 +478,13 @@
NoControl
- 285, 286
+ 499, 500
+
+
+ 5, 0, 5, 0
- 96, 20
+ 177, 37
19
@@ -490,10 +505,13 @@
7
- 387, 285
+ 677, 499
+
+
+ 5, 5, 5, 5
- 387, 23
+ 674, 35
20
@@ -520,10 +538,13 @@
NoControl
- 23, 285
+ 40, 499
+
+
+ 5, 0, 5, 0
- 59, 20
+ 106, 37
21
@@ -550,10 +571,13 @@
NoControl
- 92, 373
+ 161, 653
+
+
+ 5, 5, 5, 5
- 227, 19
+ 396, 34
22
@@ -583,10 +607,13 @@
NoControl
- 45, 136
+ 79, 238
+
+
+ 5, 0, 5, 0
- 120, 17
+ 208, 31
23
@@ -616,10 +643,13 @@
NoControl
- 45, 225
+ 79, 394
+
+
+ 5, 0, 5, 0
- 101, 17
+ 179, 31
24
@@ -646,10 +676,13 @@
NoControl
- 427, 200
+ 747, 350
+
+
+ 5, 5, 5, 5
- 90, 64
+ 158, 112
25
@@ -673,10 +706,13 @@
NoControl
- 549, 200
+ 961, 350
+
+
+ 5, 5, 5, 5
- 90, 64
+ 158, 112
26
@@ -697,10 +733,10 @@
True
- 96, 96
+ 168, 168
- 798, 428
+ 1396, 749
Segoe UI, 9pt
@@ -6877,6 +6913,9 @@
/////+AAA///////+AAD///////+AAP///////+AA/////////AD/////////4P///8=
+
+ 5, 5, 5, 5
+
CenterParent
diff --git a/src/AxaFrance.WebEngine.MobileApp/AxaFrance.WebEngine.MobileApp.csproj b/src/AxaFrance.WebEngine.MobileApp/AxaFrance.WebEngine.MobileApp.csproj
index b3034b2..6bd8bca 100644
--- a/src/AxaFrance.WebEngine.MobileApp/AxaFrance.WebEngine.MobileApp.csproj
+++ b/src/AxaFrance.WebEngine.MobileApp/AxaFrance.WebEngine.MobileApp.csproj
@@ -2,7 +2,7 @@
Library
- net48;net8.0;net9.0
+ net48;net8.0;net10.0
enable
disable
disable
diff --git a/src/AxaFrance.WebEngine.ReportViewer/AxaFrance.WebEngine.ReportViewer.csproj b/src/AxaFrance.WebEngine.ReportViewer/AxaFrance.WebEngine.ReportViewer.csproj
index a4a5d17..f044ede 100644
--- a/src/AxaFrance.WebEngine.ReportViewer/AxaFrance.WebEngine.ReportViewer.csproj
+++ b/src/AxaFrance.WebEngine.ReportViewer/AxaFrance.WebEngine.ReportViewer.csproj
@@ -7,7 +7,7 @@
WinExe
- net48;net8.0-windows;net9.0-windows
+ net48;net8.0-windows;net10.0-windows
disable
true
true
diff --git a/src/AxaFrance.WebEngine.Runner/AxaFrance.WebEngine.Runner.csproj b/src/AxaFrance.WebEngine.Runner/AxaFrance.WebEngine.Runner.csproj
index f03d468..9ea65e7 100644
--- a/src/AxaFrance.WebEngine.Runner/AxaFrance.WebEngine.Runner.csproj
+++ b/src/AxaFrance.WebEngine.Runner/AxaFrance.WebEngine.Runner.csproj
@@ -2,7 +2,7 @@
Exe
- net48;net8.0;net9.0
+ net48;net8.0;net10.0
disable
false
false
diff --git a/src/AxaFrance.WebEngine.Runner/ParameterParser.cs b/src/AxaFrance.WebEngine.Runner/ParameterParser.cs
index 2d06c4d..32263cb 100644
--- a/src/AxaFrance.WebEngine.Runner/ParameterParser.cs
+++ b/src/AxaFrance.WebEngine.Runner/ParameterParser.cs
@@ -36,6 +36,7 @@ internal static Settings ParseParameters(string[] args)
ParseOutputFolder(args, s);
ParseReportOption(args, s);
ParseShowReportOption(args, s);
+ ParseUniqueReportFolder(args, s);
return s;
}
@@ -60,6 +61,15 @@ private static void ParseShowReportOption(string[] args, Settings s)
}
}
+ private static void ParseUniqueReportFolder(string[] args, Settings s)
+ {
+ if (args.FirstOrDefault(x => x.Equals("-u", StringComparison.OrdinalIgnoreCase)) != null)
+ {
+ s.ReportSettings.UniqueReportFolder = true;
+ DebugLogger.WriteLine("[CONFIG] Reports will be saved to a unique folder suffixed by date and time.");
+ }
+ }
+
private static void ParseReportOption(string[] args, Settings s)
{
const string arg = "-junit:";
diff --git a/src/AxaFrance.WebEngine.Runner/Program.cs b/src/AxaFrance.WebEngine.Runner/Program.cs
index dbdb112..baa9df0 100644
--- a/src/AxaFrance.WebEngine.Runner/Program.cs
+++ b/src/AxaFrance.WebEngine.Runner/Program.cs
@@ -48,11 +48,11 @@ public static void Main(string[] args)
DebugLogger.WriteLine("HTML Report Generated: " + htmlReport);
}
- var reportPath = result.SaveAs(settings.LogDir, logFileName, false);
+ var reportPath = result.SaveAs(settings.LogDir, logFileName, settings.ReportSettings.UniqueReportFolder, out string reportFolder);
DebugLogger.WriteLine("Report Generated: " + reportPath);
try
{
- result.GenereteCSV(Path.Combine(settings.LogDir, "GlobalOutput.csv"), Settings.Instance.Separator, false);
+ result.GenereteCSV(Path.Combine(reportFolder, "GlobalOutput.csv"), Settings.Instance.Separator, false);
}
catch { }
if (settings.ShowReportAfterTest)
diff --git a/src/AxaFrance.WebEngine.Web/AxaFrance.WebEngine.Web.csproj b/src/AxaFrance.WebEngine.Web/AxaFrance.WebEngine.Web.csproj
index d212c78..4da116f 100644
--- a/src/AxaFrance.WebEngine.Web/AxaFrance.WebEngine.Web.csproj
+++ b/src/AxaFrance.WebEngine.Web/AxaFrance.WebEngine.Web.csproj
@@ -2,7 +2,7 @@
Library
- net48;net8.0;net9.0
+ net48;net8.0;net10.0
enable
disable
disable
diff --git a/src/AxaFrance.WebEngine/AxaFrance.WebEngine.csproj b/src/AxaFrance.WebEngine/AxaFrance.WebEngine.csproj
index c35425a..e9b4fe5 100644
--- a/src/AxaFrance.WebEngine/AxaFrance.WebEngine.csproj
+++ b/src/AxaFrance.WebEngine/AxaFrance.WebEngine.csproj
@@ -2,7 +2,7 @@
Library
- net48;net8.0;net9.0
+ net48;net8.0;net10.0
enable
disable
disable
diff --git a/src/AxaFrance.WebEngine/Report/TestSuiteReport.cs b/src/AxaFrance.WebEngine/Report/TestSuiteReport.cs
index 6d72d2e..3a7d685 100644
--- a/src/AxaFrance.WebEngine/Report/TestSuiteReport.cs
+++ b/src/AxaFrance.WebEngine/Report/TestSuiteReport.cs
@@ -107,8 +107,9 @@ public TestSuiteReport()
/// the prefixe of the report (without .xml extension), suffixed automatially with the current datetime.
/// The path where the report file will be stored.
/// Whether the report name should be unique. True: the report name will be suffixed with timestamp, False: the report name will be fixed
+ ///
/// the report Full Path name generated.
- public string SaveAs(string path, string filePrefix, bool uniqueName)
+ public string SaveAs(string path, string filePrefix, bool uniqueName, out string reportFolder)
{
this.Passed = TestResult.Count(x => x.Result == Result.Passed);
this.Failed = TestResult.Count(x => x.Result == Result.Failed || x.Result == Result.CriticalError);
@@ -116,15 +117,16 @@ public string SaveAs(string path, string filePrefix, bool uniqueName)
string filename;
if (uniqueName)
{
- filename = Path.Combine(path, filePrefix + "_" + DateTime.Now.ToString("yyyyMMdd_hhmmss") + ".xml");
+ reportFolder = path + "_" + DateTime.Now.ToString("yyyyMMdd_hhmmss");
}
else
{
- filename = Path.Combine(path, filePrefix + ".xml");
+ reportFolder = path;
}
- if (!Directory.Exists(path))
+ filename = Path.Combine(reportFolder, filePrefix + ".xml");
+ if (!Directory.Exists(reportFolder))
{
- Directory.CreateDirectory(path);
+ Directory.CreateDirectory(reportFolder);
}
using (StreamWriter sw = new StreamWriter(filename))
{
diff --git a/src/AxaFrance.WebEngine/ReportSettings.cs b/src/AxaFrance.WebEngine/ReportSettings.cs
index dca0be5..371c475 100644
--- a/src/AxaFrance.WebEngine/ReportSettings.cs
+++ b/src/AxaFrance.WebEngine/ReportSettings.cs
@@ -13,6 +13,11 @@ namespace AxaFrance.WebEngine
[XmlRoot(Namespace = GlobalConstants.XmlNamespace)]
public class ReportSettings
{
+ ///
+ /// Gets or sets a value indicating whether reports are saved to a unique folder suffixed by date and time.
+ ///
+ public bool UniqueReportFolder { get; set; } = false;
+
///
/// If a Junit compatible report should be generated after test execution
///
diff --git a/src/Samples.Gherkin/StepDefinitions/DrinkMachineStepDefinitions.cs b/src/Samples.Gherkin/StepDefinitions/DrinkMachineStepDefinitions.cs
index 0ac5791..fd4fb40 100644
--- a/src/Samples.Gherkin/StepDefinitions/DrinkMachineStepDefinitions.cs
+++ b/src/Samples.Gherkin/StepDefinitions/DrinkMachineStepDefinitions.cs
@@ -41,7 +41,7 @@ public void Cleanup()
//save test report with embedded accessibility test result.
TestSuiteReport tsr = new TestSuiteReport();
tsr.TestResult.Add(tcr);
- var filename = tsr.SaveAs(Path.GetRandomFileName(), "test-report", false);
+ var filename = tsr.SaveAs(Path.GetRandomFileName(), "test-report", false, out string reportFolder);
Console.WriteLine($"Report saved to {filename}");
}
diff --git a/src/Samples.KeywordDriven/Properties/launchSettings.json b/src/Samples.KeywordDriven/Properties/launchSettings.json
index 843b1de..c9ce146 100644
--- a/src/Samples.KeywordDriven/Properties/launchSettings.json
+++ b/src/Samples.KeywordDriven/Properties/launchSettings.json
@@ -3,7 +3,7 @@
"WebRunner": {
"commandName": "Executable",
"executablePath": ".\\WebRunner.exe",
- "commandLineArgs": "\"-a:Samples.KeywordDriven.dll\" -browser:Chrome -showReport",
+ "commandLineArgs": "\"-a:Samples.KeywordDriven.dll\" -browser:Chrome -showReport -u",
"workingDirectory": ".\\bin\\Debug\\net9.0-windows"
}
}
diff --git a/src/Samples.LinearScripting/UnitTest1.cs b/src/Samples.LinearScripting/UnitTest1.cs
index d91ba77..98ddb91 100644
--- a/src/Samples.LinearScripting/UnitTest1.cs
+++ b/src/Samples.LinearScripting/UnitTest1.cs
@@ -61,7 +61,7 @@ public static void ClassTearDown()
{
//After all test cases, we will save the test suite report.
testSuiteReport!.EndTime = DateTime.Now;
- var reportPath = testSuiteReport.SaveAs("TestReport", "TEST-MyTestReport", false);
+ var reportPath = testSuiteReport.SaveAs("TestReport", "TEST-MyTestReport", false, out string reportFolder);
//you can check the test report in folder bin\Debug\net8.0\TestReport of your test project.
DebugLogger.WriteLine($"Test Suite Report saved at: {reportPath}");
diff --git a/src/WebEngine.Test/UnitTests/AppMobileTest.cs b/src/WebEngine.Test/UnitTests/AppMobileTest.cs
index 2effe4c..9c70422 100644
--- a/src/WebEngine.Test/UnitTests/AppMobileTest.cs
+++ b/src/WebEngine.Test/UnitTests/AppMobileTest.cs
@@ -31,7 +31,7 @@ public void IntegrationTest()
var result = testsuite.Run();
testsuite.CleanUp(settings);
var path = System.IO.Path.GetTempPath();
- var XmlReport = result.SaveAs(path, "testResult", true);
+ var XmlReport = result.SaveAs(path, "testResult", true, out string reportFolder);
string junitReport = ReportHelper.GenerateJUnitReport(result, "mytest", path);
Assert.IsTrue(result.Duration.TotalSeconds > 0);
diff --git a/src/WebEngine.Test/UnitTests/ResoureUsageTest.cs b/src/WebEngine.Test/UnitTests/ResoureUsageTest.cs
index de426b2..1abddca 100644
--- a/src/WebEngine.Test/UnitTests/ResoureUsageTest.cs
+++ b/src/WebEngine.Test/UnitTests/ResoureUsageTest.cs
@@ -39,7 +39,7 @@ public async void RunTestWithResourceMonitoring()
};
tcr.Attach(usageReport, GlobalConstants.ResourceUsageReport);
tsr.TestResult.Add(tcr);
- var report = tsr.SaveAs(Path.GetTempPath(), "unit-test", true);
+ var report = tsr.SaveAs(Path.GetTempPath(), "unit-test", true, out string reportFolder);
}
}
}