# Running Tests Cases

### **Execute a single test**

You may execute your test from the cases screen by doing the following:

* Inside the cases screen, click on the case you created.
* You can decide who will receive notification for this case.

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2FDiQYXV2Lu9tEGh2pwsuA%2F2023-12-20%2015_16_58-Testing%20-%20CloudBeat.jpg?alt=media&#x26;token=2e59b1a4-163f-455b-b653-82ec61bf62ff" alt=""><figcaption></figcaption></figure>

* You can schedule the case to run whenever you need.

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2FVGLJWliixyy2CBn2sXZr%2F2023-12-20%2015_16_45-Testing%20-%20CloudBeat.jpg?alt=media&#x26;token=bcddfc29-9979-4631-93ee-bd07d47a183e" alt=""><figcaption></figcaption></figure>

* You can use data from a parameters file such as xlsx by uploading it.

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2FTHS3IxBoYwm7wDXMQrco%2F2023-12-20%2015_19_56-Testing%20-%20CloudBeat.jpg?alt=media&#x26;token=fffe3256-ab03-4214-805d-34651fad579a" alt=""><figcaption></figcaption></figure>

Accessing the parameters in the script:

```
const email = params.email
log.info(email) // 1@gmail.com
```

* Select the browser you wish to run the case on.

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2F0MirR6wIVIz7gvwEqS9v%2F2023-12-20%2015_20_04-Testing%20-%20CloudBeat.jpg?alt=media&#x26;token=8376ad53-053c-487c-a19e-3da268bf8321" alt=""><figcaption></figcaption></figure>

* Upload the script you wish to run.

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2FDLZkVwEeeZAmkYoYG3Wn%2F2023-12-20%2015_21_18-Testing%20-%20CloudBeat.jpg?alt=media&#x26;token=e1b26792-c813-4a03-9dfd-ad152ec399f9" alt=""><figcaption></figcaption></figure>

* (Optional) - Go to settings and select [environment](https://docs.cloudbeat.io/fundamentals/broken-reference) and [releases](https://docs.cloudbeat.io/fundamentals/broken-reference) you wish to run it on.

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2FgM17nsPDwUdQZUTXK4ui%2F2023-12-20%2015_25_14-Testing%20-%20CloudBeat.jpg?alt=media&#x26;token=85e71ab9-5a45-4a50-9bac-a8efff371ee2" alt=""><figcaption></figcaption></figure>

* Write details and upload relevant files for your case, and then click on Save Changes.

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2FqUjRY6bQkNVWwXI9j6fp%2F2023-12-20%2015_25_48-Testing%20-%20CloudBeat.jpg?alt=media&#x26;token=60c4fbe3-f500-47be-999a-ea1907ab5ef4" alt=""><figcaption></figcaption></figure>

* Click on ‘Run now’ button which appears at the top right, The results will appear under Results tab.

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2FWXkMiAK8HESMi0qECLyo%2F2023-12-20%2015_34_23-Testing%20-%20CloudBeat.jpg?alt=media&#x26;token=5c208068-2356-43d5-8505-80da1d64db65" alt=""><figcaption></figcaption></figure>

* Click on the date, it will open the details about the case, on which browser it ran and it's steps:

<div><figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2F55AQcBCMY2Hmvan1IjNb%2F2023-12-20%2015_27_49-Testing%20-%20CloudBeat.jpg?alt=media&#x26;token=ed7062ab-5250-46f6-a7b9-fd86598dd104" alt=""><figcaption></figcaption></figure> <figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2Fr6oKuuvY5Zw0cc1uLuwh%2F2023-12-20%2015_29_53-Testing%20-%20CloudBeat.jpg?alt=media&#x26;token=b02a9fb7-cd83-4fbf-95d0-33e32edee200" alt=""><figcaption></figcaption></figure></div>

* When the case opens a website, it also shows the requests happening behind the scenes:

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2F8bc336k9gGKA2bIT37fL%2F2023-12-20%2015_30_24-Har%20-%20CloudBeat.jpg?alt=media&#x26;token=5f9b150d-4606-4dfe-a17b-b55855b38120" alt=""><figcaption></figcaption></figure>

* Now, let's open a failed case, we will see the failure reason, as well as all the steps lead to it, on which line it failed, and the screenshot of the failed step. Same as before, we can see the requests.

<div><figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2FPPSqkstGDMnHjKKZOAyE%2F2023-12-20%2015_34_50-Testing%20-%20CloudBeat.jpg?alt=media&#x26;token=aaec53cc-ef20-401c-b686-c6e5df1d05f5" alt=""><figcaption></figcaption></figure> <figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2FrKd2Gl96TeghRPKpYsS0%2F2023-12-20%2015_35_51-Testing%20-%20CloudBeat.jpg?alt=media&#x26;token=73e58b69-a331-41a5-a047-bfc717ae17bb" alt=""><figcaption></figcaption></figure></div>

## **Execute a test suite**

Running suites is exactly the same as running a single case, except here you can add multiple cases to run together. You may execute your test from the suites screen by doing the following:

* Inside the suites screen, click on the suite you created.

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2FEWnYrNmf7lWLumE1odCp%2F2023-12-20%2016_37_18-Test%20Suites%20-%20CloudBeat.jpg?alt=media&#x26;token=428e0d4a-a05f-4b0b-89c1-468ae4f2384c" alt=""><figcaption></figcaption></figure>

* Under Cases or Tags, click on add cases:

<div><figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2FeUKJOsECNk9HLNzH9SVv%2F2023-12-20%2016_37_56-Test%20Suites%20-%20CloudBeat.jpg?alt=media&#x26;token=9907593b-b6e8-4e79-807b-1dce70319788" alt=""><figcaption></figcaption></figure> <figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2Fyyk6bnowy9BIu3y2B9W5%2F2023-12-20%2016_38_37-Test%20Suites%20-%20CloudBeat.jpg?alt=media&#x26;token=26347772-dd78-4294-a670-7621b9d2e4fb" alt=""><figcaption></figcaption></figure></div>

* You may select which cases to run, by default it will run everything, save changes then run now:

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2FvQq5IS5OAPOoVHwke18H%2F2023-12-20%2016_38_56-Test%20Suites%20-%20CloudBeat.jpg?alt=media&#x26;token=4da914ac-5747-404c-89fb-e570bc7750e4" alt=""><figcaption></figcaption></figure>

* White the suite is running, you may see the progress:

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2Fo9jSvOWElKXwzFvaRpYp%2F2023-12-20%2016_44_07-Test%20Suites%20-%20CloudBeat.jpg?alt=media&#x26;token=1ec5d87e-e86c-4212-816d-d6eebe588c31" alt=""><figcaption></figcaption></figure>

* Finally, see the results by clicking on each case:

<figure><img src="https://1835512707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LuDeDlFo7eLPBFbUgtb%2Fuploads%2F7gxtIKFRfyBxYkQTo2NX%2F2023-12-20%2016_49_19-Test%20Suites%20-%20CloudBeat.jpg?alt=media&#x26;token=2f8f4187-c735-43e9-b4c8-591816fe3b01" alt=""><figcaption></figcaption></figure>
