|
| 1 | +--- |
| 2 | +id: hyperexecute-postman-collection-integration |
| 3 | +title: Integrate Postman Collection with HyperExecute |
| 4 | +hide_title: false |
| 5 | +sidebar_label: Postman |
| 6 | +description: To ensure effective API test execution, integrate your postman collection with HyperExecute by exporting your Postman collection and executing on HyperExecute. |
| 7 | +keywords: |
| 8 | + - hyperexecute integrations |
| 9 | + - hyperexecute integrations with products |
| 10 | + - products |
| 11 | + - postman apis |
| 12 | + - postman integration |
| 13 | + - postman collection integration |
| 14 | +url: https://www.lambdatest.com/support/docs/hyperexecute-postman-collection-integration/ |
| 15 | +site_name: LambdaTest |
| 16 | +slug: hyperexecute-postman-collection-integration/ |
| 17 | +--- |
| 18 | + |
| 19 | +import CodeBlock from '@theme/CodeBlock'; |
| 20 | +import {YOUR_LAMBDATEST_USERNAME, YOUR_LAMBDATEST_ACCESS_KEY} from "@site/src/component/keys"; |
| 21 | + |
| 22 | +import Tabs from '@theme/Tabs'; |
| 23 | +import TabItem from '@theme/TabItem'; |
| 24 | + |
| 25 | +<script type="application/ld+json" |
| 26 | + dangerouslySetInnerHTML={{ __html: JSON.stringify({ |
| 27 | + "@context": "https://schema.org", |
| 28 | + "@type": "BreadcrumbList", |
| 29 | + "itemListElement": [{ |
| 30 | + "@type": "ListItem", |
| 31 | + "position": 1, |
| 32 | + "name": "Home", |
| 33 | + "item": "https://www.lambdatest.com" |
| 34 | + },{ |
| 35 | + "@type": "ListItem", |
| 36 | + "position": 2, |
| 37 | + "name": "Support", |
| 38 | + "item": "https://www.lambdatest.com/support/docs/" |
| 39 | + },{ |
| 40 | + "@type": "ListItem", |
| 41 | + "position": 3, |
| 42 | + "name": "Postman Collection Integration with HyperExecute", |
| 43 | + "item": "https://www.lambdatest.com/support/docs/hyperexecute-postman-collection-integration/" |
| 44 | + }] |
| 45 | + }) |
| 46 | + }} |
| 47 | +></script> |
| 48 | +This guide walks you through the complete process of executing a Postman collection on the LambdaTest HyperExecute platform — from exporting your collection in Postman to viewing Allure reports on the LambdaTest Analytics dashboard. |
| 49 | + |
| 50 | +## Prerequisite |
| 51 | +Before you begin, make sure you have the following: |
| 52 | + |
| 53 | +- A configured Postman Collection |
| 54 | +- Your lambdatest [Username and Access key](/support/docs/hyperexecute-how-to-get-my-username-and-access-key/) |
| 55 | + |
| 56 | +## Step 1: Export the Postman Collection |
| 57 | + |
| 58 | +- On your postman workspace, right-click on your desired collection and select Export. |
| 59 | +- Choose the Collection v2.1 format and click Export. |
| 60 | +- Save the downloaded JSON file locally (e.g., collection.json). |
| 61 | + |
| 62 | +You can use your own project to configure and test it. For demo purposes, we are using the sample repository. |
| 63 | + |
| 64 | +:::tip Sample repo |
| 65 | +Download or Clone the code sample for the Postman from the LambdaTest GitHub repository to run the APIs on the HyperExecute. |
| 66 | + |
| 67 | +<a href="https://github.com/LambdaTest/hyperexecute-postman-collection-integration-using-newman" className="github__anchor"><img loading="lazy" src={require('../assets/images/icons/github.png').default} alt="Image" className="doc_img"/> View on GitHub</a> |
| 68 | +::: |
| 69 | + |
| 70 | +## Step 2: Set Up Your HyperExecute Project |
| 71 | +### 1. Create a Project Folder |
| 72 | +- Create a new directory to house your project files. |
| 73 | +- Move the exported Postman JSON file into this folder. |
| 74 | +- Replace the placeholder `<NAME_OF_JSON_FILE>` with the actual filename (e.g., collection.json) in both `discoveryCommand` and `testRunnerCommand` fields. |
| 75 | + |
| 76 | +### 2. Add the Discovery Script |
| 77 | +- Create a new file named `discovery.js`. |
| 78 | + |
| 79 | +```yaml reference |
| 80 | +https://github.com/LambdaTest/hyperexecute-postman-collection-integration-using-newman/blob/main/discovery.js |
| 81 | +``` |
| 82 | + |
| 83 | +### 3. Add the HyperExecute Binary |
| 84 | +The CLI binary is used for triggering the tests on HyperExecute. It is recommend to download the CLI binary on the host system and keep it in the root directory of the suite to perform the tests on HyperExecute. |
| 85 | + |
| 86 | +Download the appropriate binary for your OS and setup the environment variables. Place the binary (e.g., hyperexecute or hyperexecute.exe) in the project folder. |
| 87 | + |
| 88 | +| Platform | HyperExecute CLI | |
| 89 | +| ---------| ---------------- | |
| 90 | +| Windows | https://downloads.lambdatest.com/hyperexecute/windows/hyperexecute.exe | |
| 91 | +| MacOS | https://downloads.lambdatest.com/hyperexecute/darwin/hyperexecute | |
| 92 | +| Linux | https://downloads.lambdatest.com/hyperexecute/linux/hyperexecute | |
| 93 | + |
| 94 | +#### Setup Environment Variable |
| 95 | + |
| 96 | +Now, you need to export your environment variables *LT_USERNAME* and *LT_ACCESS_KEY* that are available in the [LambdaTest Profile page](https://accounts.lambdatest.com/detail/profile). Run the below mentioned commands in your terminal to setup the CLI and the environment variables. |
| 97 | + |
| 98 | +<Tabs className="docs__val"> |
| 99 | + |
| 100 | +<TabItem value="bash" label="Linux / MacOS" default> |
| 101 | + |
| 102 | + <div className="lambdatest__codeblock"> |
| 103 | + <CodeBlock className="language-bash"> |
| 104 | + {`export LT_USERNAME="${ YOUR_LAMBDATEST_USERNAME()}" |
| 105 | +export LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`} |
| 106 | + </CodeBlock> |
| 107 | +</div> |
| 108 | + |
| 109 | +</TabItem> |
| 110 | + |
| 111 | +<TabItem value="powershell" label="Windows" default> |
| 112 | + |
| 113 | + <div className="lambdatest__codeblock"> |
| 114 | + <CodeBlock className="language-powershell"> |
| 115 | + {`set LT_USERNAME="${ YOUR_LAMBDATEST_USERNAME()}" |
| 116 | +set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`} |
| 117 | + </CodeBlock> |
| 118 | +</div> |
| 119 | + |
| 120 | +</TabItem> |
| 121 | +</Tabs> |
| 122 | + |
| 123 | +## Step 3: Configure YAML in your Test Suite |
| 124 | + |
| 125 | +```yaml reference |
| 126 | +https://github.com/LambdaTest/hyperexecute-postman-collection-integration-using-newman/blob/main/hyperexecute.yaml |
| 127 | +``` |
| 128 | + |
| 129 | +## Step 4: Execute your Test Suite |
| 130 | + |
| 131 | +> **NOTE :** In case of MacOS, if you get a permission denied warning while executing CLI, simply run **`chmod u+x ./hyperexecute`** to allow permission. In case you get a security popup, allow it from your **System Preferences** → **Security & Privacy** → **General tab**. |
| 132 | +
|
| 133 | +Run the below command in your terminal at the root folder of the project: |
| 134 | + |
| 135 | +```bash |
| 136 | +./hyperexecute --config RELATIVE_PATH_OF_YOUR_YAML_FILE |
| 137 | +``` |
| 138 | + |
| 139 | +OR use this command if you have not exported your username and access key in the step 2. |
| 140 | + |
| 141 | +<div className="lambdatest__codeblock"> |
| 142 | + <CodeBlock className="language-bash"> |
| 143 | + {`./hyperexecute --user ${ YOUR_LAMBDATEST_USERNAME()} --key ${ YOUR_LAMBDATEST_ACCESS_KEY()} --config RELATIVE_PATH_OF_YOUR_YAML_FILE `} |
| 144 | + </CodeBlock> |
| 145 | +</div> |
| 146 | + |
| 147 | +## Step 5: Monitor the Test Execution |
| 148 | + |
| 149 | +Visit the [HyperExecute Dashboard](https://hyperexecute.lambdatest.com/hyperexecute) and check your Job status. |
0 commit comments