> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# muuklabs/muuktest

Easily execute tests from MuukTest on CircleCI integration. Provides jobs for executing on Selenium (using our mkcli python script) or Playwright.


## Jobs

### mkcli

MuukTest Selenium executor with Circle CI on Github.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `browser` | enum | chrome | Set either from chrome or firefox to run the script on. |
| `muuk_key` | env_var_name | MUUKTEST_KEY | Name of the env var with your MuukTest key.pub account value. This var should be set on CircleCi settings. |
| `p` | enum | tag | Set either tag or hastag according value on t parameter. |
| `t` | string |  | Test case id or hashtag name. |

### mkpw

MuukTest Playwright executor with Circle CI on Github.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `base_url` | string |  | URL to be used as domain for this pipeline execution of the tests. This parameter can also receive an env var name and manage to resolve the value. Either use a literal value or a name of an env variable to resolve the URL to be used. |
| `browser` | enum | chromium | Set either from chrome or firefox to run the script on. |
| `muuk_key` | env_var_name | MUUKTEST_KEY | Name of the env var with your MuukTest key.pub account value. This var should be set on CircleCi settings. |
| `p` | enum | tag | Set either tag or hastag according value on t parameter. |
| `t` | string |  | Test case id or hashtag name. |
| `workers` | integer | 2 | Number of parallel workers to be used by Playwright. |

## Examples

### mkcli_basic_run

This example runs the test with tag TC0001. Change tag to the right value in order to run any test from your organization.
Prerequisites: set an environment variable under your CircleCi project settings with your organization key. Hence use the variable name for the muuk_key parameter, if the name of your variable is MUUK_KEY then you don't need set muuk_key paramter as that variable name is used by default.
Please see the following link for reference: https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-project
Want to know which is your organization key? No problem, see the next link for reference:
https://muuklabs.zendesk.com/hc/en-us/articles/4408400288787-Portal-Account


```yaml
version: '2.1'
orbs:
  muuktest: muuklabs/muuktest@2.1.1
workflows:
  execute:
    jobs:
      - muuktest/mkcli:
          muuk_key: MUUK_KEY
          t: TC0001
```

### mkcli_run_on_firefox

By default, test are run on chrome, this example instead runs the test with tag TC0001 on firefox according to the browser's parameter.
Prerequisites: set an environment variable under your CircleCi project settings with your organization key. Hence use the variable name for the muuk_key parameter, if the name of your variable is MUUK_KEY then you don't need set muuk_key paramter as that variable name is used by default.
Please see the following link for reference: https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-project
Want to know which is your organization key? No problem, see the next link for reference:
https://muuklabs.zendesk.com/hc/en-us/articles/4408400288787-Portal-Account


```yaml
version: '2.1'
orbs:
  muuktest: muuklabs/muuktest@2.0.7
workflows:
  execute:
    jobs:
      - muuktest/mkcli:
          browser: firefox
          muuk_key: MUUK_KEY
          t: TC0001
```

### mkcli_run_test_by_hashtag

This example executes all the tests with the hashtag '#deployment' (notice the # char should not be included on the command).
Prerequisites: set an environment variable under your CircleCi project settings with your organization key. Hence use the variable name for the muuk_key parameter, if the name of your variable is MUUK_KEY then you don't need set muuk_key paramter as that variable name is used by default.
Please see the following link for reference: https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-project
Want to know which is your organization key? No problem, see the next link for reference:
https://muuklabs.zendesk.com/hc/en-us/articles/4408400288787-Portal-Account


```yaml
version: '2.1'
orbs:
  muuktest: muuklabs/muuktest@2.0.7
workflows:
  execute:
    jobs:
      - muuktest/mkcli:
          browser: firefox
          muuk_key: MUUK_KEY
          p: hashtag
          t: deployment
```

### mkpw_basic_run

This example runs the test with tag TC0001 on Playwright executor. Change tag to the right value in order to run any test from your organization.
Prerequisites: set an environment variable under your CircleCi project settings with your organization key. Hence use the variable name for the muuk_key parameter, if the name of your variable is MUUK_KEY then you don't need set muuk_key paramter as that variable name is used by default.
Please see the following link for reference: https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-project
Want to know which is your organization key? No problem, see the next link for reference:
https://muuklabs.zendesk.com/hc/en-us/articles/4408400288787-Portal-Account


```yaml
version: '2.1'
orbs:
  muuktest: muuklabs/muuktest@2.1.1
workflows:
  execute:
    jobs:
      - muuktest/mkpw:
          muuk_key: MUUK_KEY
          t: TC0001
```

### mkpw_test_by_hashtag

This example executes all the tests with the hashtag '#deployment' on Playwright executor (the # char could either be included or not on the value).
Also the tests are executed against the provided base_url through an env variable: TEST_URL in this case, but this parameter accepts also a literal string value, so you can set it to any URL you desired, either an env var name that is set on CircleCi or a literal string value.
or hardcoded.
Prerequisites: set environment variables under your CircleCi project settings with your organization key and URL (if intended to use env variable for URL). Hence use the variable name for the muuk_key parameter, if the name of your variable is MUUK_KEY then you don't need set muuk_key paramter as that variable name is used by default.
Please see the following link for reference: https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-project
Want to know which is your organization key? No problem, see the next link for reference:
https://muuklabs.zendesk.com/hc/en-us/articles/4408400288787-Portal-Account


```yaml
version: '2.1'
orbs:
  muuktest: muuklabs/muuktest@2.1.1
workflows:
  execute:
    jobs:
      - muuktest/mkpw:
          base_url: TEST_URL
          muuk_key: MUUK_KEY
          p: hashtag
          t: deployment
```