GetTestNGArgs
prompts the user to input various paths and settings for TestNG testing configuration, populating a GetTestNGArgsStruct
with these inputs.
Field | Type | Description |
---|---|---|
WorkspaceFolder | string | The root folder of the workspace. |
EnvVarsFile | string | Path to the script setting environment variables for the app. |
TestNGFolder | string | Location of the TestNG application. |
SuiteFile | string | XML suite file needed for TestNG, relative to the TestNG folder. |
ParamEnv | string | Environment parameter for TestNG. |
Collects user inputs for TestNG configuration through a series of prompts.
Parameter | Type | Description |
---|---|---|
c | GetTestNGArgsStruct | The struct to populate with user inputs. |
Returns | Type | Description |
---|---|---|
c | GetTestNGArgsStruct | The struct populated with user inputs. |
- EnvVarsFile: Prompt for the script where environment variables are set, defaulting to a path within the workspace.
- TestNGFolder: Prompt for the TestNG application location, defaulting to a path within the workspace.
- SuiteFile: Prompt for the XML suite file path relative to the TestNG folder, defaulting to a typical TestNG resource path.
- ParamEnv: Uses
ShowMenu
to allow the user to select an environment to test, with options for "DEV", "PREVIEW", and "PROD", and an option to specify a different environment.
This function streamlines the configuration process for TestNG tests by gathering necessary file paths and environment settings from the user, facilitating a more dynamic and interactive setup process.