|
| 1 | +--- |
| 2 | +id: hyperexecute-release-notes-2-7-3 |
| 3 | +title: Version 2.7.3 |
| 4 | +hide_title: false |
| 5 | +sidebar_label: Version 2.7.3 |
| 6 | +description: Version 2.7.3 |
| 7 | +keywords: |
| 8 | + - LambdaTest Hyperexecute |
| 9 | + - LambdaTest Hyperexecute help |
| 10 | + - LambdaTest Hyperexecute documentation |
| 11 | + - FAQs |
| 12 | +url: https://www.lambdatest.com/support/docs/hyperexecute-release-notes-2-7-3/ |
| 13 | +site_name: LambdaTest |
| 14 | +slug: hyperexecute-release-notes-2-7-3/ |
| 15 | +--- |
| 16 | + |
| 17 | +import NewReleaseTag from '../src/component/newRelease.js'; |
| 18 | +import EnhancementTag from '../src/component/enhancementTag'; |
| 19 | +import BugFixTag from '../src/component/bugFixTag'; |
| 20 | + |
| 21 | +<script type="application/ld+json" |
| 22 | + dangerouslySetInnerHTML={{ __html: JSON.stringify({ |
| 23 | + "@context": "https://schema.org", |
| 24 | + "@type": "BreadcrumbList", |
| 25 | + "itemListElement": [{ |
| 26 | + "@type": "ListItem", |
| 27 | + "position": 1, |
| 28 | + "name": "Home", |
| 29 | + "item": "https://www.lambdatest.com" |
| 30 | + },{ |
| 31 | + "@type": "ListItem", |
| 32 | + "position": 2, |
| 33 | + "name": "Support", |
| 34 | + "item": "https://www.lambdatest.com/support/docs/" |
| 35 | + },{ |
| 36 | + "@type": "ListItem", |
| 37 | + "position": 3, |
| 38 | + "name": "Version", |
| 39 | + "item": "https://www.lambdatest.com/support/docs/hyperexecute-release-notes-2-7-3/" |
| 40 | + }] |
| 41 | + }) |
| 42 | + }} |
| 43 | +></script> |
| 44 | + |
| 45 | +## `globalPre` and `globalPost` flag in HyperExecute YAML |
| 46 | +The [`globalPre`](https://www.lambdatest.com/support/docs/deep-dive-into-hyperexecute-yaml/#globalpre) and [`globalPost`](https://www.lambdatest.com/support/docs/deep-dive-into-hyperexecute-yaml/#globalpost) flags in the HyperExecute YAML configuration allow for global setup and teardown operations for test execution. These flags enable users to define commands that run before any tests begin (globalPre) and after all tests have completed (globalPost), providing greater control over test executions. |
| 47 | + |
| 48 | +```yaml title="hyperexecute.yaml" |
| 49 | +# globalPre |
| 50 | +globalPre: |
| 51 | + mode: remote #local or remote |
| 52 | + commands: |
| 53 | + - "echo 'Setting up environment'" |
| 54 | + - "apt-get update && apt-get install -y curl" |
| 55 | + - "curl -X POST https://api.example.com/init" |
| 56 | + runson: linux |
| 57 | + |
| 58 | +# globalPost |
| 59 | +globalPost: |
| 60 | + mode: remote #local or remote |
| 61 | + commands: |
| 62 | + - "echo 'Cleaning up test environment'" |
| 63 | + - "rm -rf /tmp/test-results" |
| 64 | + - "curl -X POST https://api.example.com/cleanup" |
| 65 | + runson: linux |
| 66 | +``` |
| 67 | +
|
| 68 | +<img loading="lazy" src={require('../assets/images/hyperexecute/release-notes/globalPre-globalPost.png').default} alt="cmd" className="doc_img"/> |
| 69 | +
|
| 70 | +> 📘 Refer to our detailed documentation for [`globalPre`](https://www.lambdatest.com/support/docs/deep-dive-into-hyperexecute-yaml/#globalpre) and [`globalPost`](https://www.lambdatest.com/support/docs/deep-dive-into-hyperexecute-yaml/#globalpost) flags. |
0 commit comments