From 74923eef926807f069de56a95c54fe8a2e2c8ff4 Mon Sep 17 00:00:00 2001 From: amanchopra1905 Date: Wed, 29 Jan 2025 18:06:03 +0530 Subject: [PATCH 1/3] afterEachScenario flag - HyperExecute --- docs/deep-dive-into-hyperexecute-yaml.md | 12 ++++++++++++ docs/hyperexecute-yaml-parameters.md | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/deep-dive-into-hyperexecute-yaml.md b/docs/deep-dive-into-hyperexecute-yaml.md index c98fac850..10d5a0458 100644 --- a/docs/deep-dive-into-hyperexecute-yaml.md +++ b/docs/deep-dive-into-hyperexecute-yaml.md @@ -1272,6 +1272,18 @@ We can choose to run on local/remote(on HYP Vms) from the location command. Type *** +### `afterEachScenario` +The `afterEachScenario` flag is used to define tasks that should be executed after each test scenario. This can be particularly useful for cleanup activities, such as clearing cookies, resetting databases, or capturing logs, ensuring that each test scenario starts with a clean state. This flag allows you to specify a list of commands or scripts that will run sequentially after the completion of each scenario. This ensures that any necessary teardown steps are consistently applied, maintaining the integrity and isolation of your test scenarios. + +```yaml +afterEachScenario: + - echo "Running a script" + - pwsh run.test + - bash script.sh +``` + +*** + ### `buildConfig` This is used to manage hyperlink behavior based on test status. Here's a breakdown of the parameters within buildConfig: diff --git a/docs/hyperexecute-yaml-parameters.md b/docs/hyperexecute-yaml-parameters.md index 4ac2669df..cb78b8ff4 100644 --- a/docs/hyperexecute-yaml-parameters.md +++ b/docs/hyperexecute-yaml-parameters.md @@ -161,7 +161,9 @@ The **HyperExecute YAML** file serves as the foundational component for test exe | [alwaysRunPostSteps](/support/docs/deep-dive-into-hyperexecute-yaml/#alwaysrunpoststeps) | Boolean | Execute the Post Steps in every scenario case | | [cacheTestURL](/support/docs/deep-dive-into-hyperexecute-yaml/#cachetesturl) | Boolean |It enables users to cache static test files. | | [afterAll](/support/docs/deep-dive-into-hyperexecute-yaml/#afterall) | Map |It is used to run commands after the job has finished. | -| [projectName](/support/docs/deep-dive-into-hyperexecute-yaml/#projectname) | String | Segregate data at a project/repo level | +| [project](/support/docs/deep-dive-into-hyperexecute-yaml/#project) | String | Segregate data at a project/repo level | +| [slackChannel](/support/docs/deep-dive-into-hyperexecute-yaml/#slackchannel) | String | Allows you to receive notifications of your Job updates directly in your preferred Slack channel. | +| [afterEachScenario](/support/docs/deep-dive-into-hyperexecute-yaml/#aftereachscenario) | | |