# Dynamic Values

## Test Specific Values

Test specific values are different across tests & runs but remain the same throughout a test run.

| Name                   | Description                                                                                                                                                                                                             | Example                                                                           |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| **testStartedAt**      | <p>When the DoesQA test runner began running the test.<br>In the format "YYYYMMDDHHmm".</p>                                                                                                                             | 202405201301                                                                      |
| **testStartedAtUnix**  | The UNIX output of when the test case was started, in seconds.                                                                                                                                                          | 1548381600                                                                        |
| **testStartedAtDay**   | The current day that the test runner started the test. In the format "DD".                                                                                                                                              | 12                                                                                |
| **testStartedAtMonth** | The current month that the test runner started the test. In the format "MM".                                                                                                                                            | 05                                                                                |
| **testName**           | <p>This value represents the name of the test running, joining up all of the "Name Test" nodes.</p><p></p><p>Alternatively, if no name nodes are present, it will be the name of the flow with an index at the end.</p> | Login -> Register -> Verify Email                                                 |
| **testNumber**         | Each test case run in DoesQA gets a unique ID, this number will never be used again, so is unique per test run (even running the same test results in a different ID).                                                  | 854987                                                                            |
| **testSentence**       | Generates a space separated list of words beginning a capital letter and ending with a dot.                                                                                                                             | Voluptatum cupiditate suscipit autem eveniet aut dolorem aut officiis distinctio. |
| **testFullName**       | <p>A generated full name for the test. This value is the same throughout the entire test case.</p><p></p><p><strong>Note:</strong> This is not the same as "\[FIRST NAME] \[LAST NAME]".</p>                            | Bruce Wayne                                                                       |
| **testFirstName**      | A generated first name for the test. This value is the same throughout the entire test case.                                                                                                                            | Peter                                                                             |
| **testLastName**       | A generated last name for the test. This value is the same throughout the entire test case.                                                                                                                             | Parker                                                                            |
| **testEmail**          | Using the testNumber above, a unique email is created with every test. This can be used in combination with our Mail nodes to read, and interact with E-Mails within a test run.                                        | <93843@testcase.v2.doesqa.email>                                                  |
| **testEmailShort**     | A shorter version of the above email                                                                                                                                                                                    | <93843@t.v2.doesqa.email>                                                         |
| **testUsername**       | <p>A generated username for the test. This value is the same throughout the entire test case.</p><p></p><p><strong>Note:</strong> This is not the same as "\[FIRST NAME].\[LAST NAME]".</p>                             | tony.stark                                                                        |
| **testZipCode**        | A generated US ZIP Code in the format "#####".                                                                                                                                                                          | 10145                                                                             |
| **testPhoneUS**        | A generated US Phone Number in the format "(###) ###-###".                                                                                                                                                              | (123) 456-789                                                                     |
| **testPhoneUK**        | A generated UK Phone Number in the format "##### ### ###".                                                                                                                                                              | 01190 123 456                                                                     |

## Run Specific Values

Run specific values are different across runs but the same within all tests in a run.

| Name         | Description                                                                                                                                   | Example                |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
| **runId**    | A DoesQA Run ID for the tests, all tests triggered under the same command (Flow, Schedule, or CI/CD) will have the same Run ID.               | wicked-test-automation |
| **runLabel** | If you provide a label when triggering DoesQA tests from CI/CD then this will be present. If none was sent, the value will be "No label set". | Staging Deploy v1.1    |

## Account & Flow Values

Values unique to your account or the flow the test is from, these will be the same across all test runs.

| Name                  | Description                                                                                                                                                                                                                                        | Example                          |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| **accountEmail**      | <p>A shared mailbox across test cases, not recommended for use on registration, as it will be the same value for every test within your account.</p><p></p><p>Handy for being able to view mail that is then going to use the testEmail below.</p> | <r4Nd0m@account.v2.doesqa.email> |
| **accountEmailShort** | A shorter version of the above email                                                                                                                                                                                                               | <r4Nd0m@a.v2.doesqa.email>       |
| **flowName**          | Name of the flow which this test was generated from.                                                                                                                                                                                               | Users & My Account               |

## Date Values

Some useful values to help you work with dates.

| Name               | Description                                                                                                       | Example      |
| ------------------ | ----------------------------------------------------------------------------------------------------------------- | ------------ |
| **currentUnix**    | The amount of seconds since 01/01/1970 at the point this value is called.                                         | 202405201301 |
| **nextDay**        | <p>The next day after the test runner started the test, outputting only the day.<br>In the format "DD"</p>        | 13           |
| **nextMonth**      | The next month after the test runner started the test, outputting only the month. In the format "MM".             | 06           |
| **nextYear**       | <p>The next year after the test runner started the test, outputting only the year.<br>In the format "YYYY".</p>   | 2025         |
| **yesterdayDay**   | <p>The current year that the test runner started the test, outputting only the day.<br>In the format "DD".</p>    | 11           |
| **yesterdayMonth** | The previous day that the test runner started the test, outputting only the month. In the format "MM".            | 05           |
| **yesterdayYear**  | <p>The previous day that the test runner started the test, outputting only the year.<br>In the format "YYYY".</p> | 2024         |

## URL Values

Flow values relate to the flow the test case is a part of.

| Name              | Description                                                               | Example                                           |
| ----------------- | ------------------------------------------------------------------------- | ------------------------------------------------- |
| **currentUrl**    | The entire URL when this parameter is called.                             | <https://does.qa/test-automation/variable-values> |
| **currentOrigin** | The Origin (base domain) of the current URL when this value is retrieved. | does.qa                                           |
| **currentPath**   | The entire path (everything after the origin) when this value is called.  | /test-automation/variable-values                  |

## Random Values

These values will (very very very likely) produce a different value every time they are used.

| Name                | Description                                                                                        | Example                                                                           |
| ------------------- | -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| **randomNumber**    | A randomly generated number between 1 and 99999.                                                   | 12345                                                                             |
| **randomSentence**  | Generates a random space separated list of words beginning a capital letter and ending with a dot. | Voluptatum cupiditate suscipit autem eveniet aut dolorem aut officiis distinctio. |
| **randomFullName**  | A random full name, regenerated every time this value is called.                                   | Wanda Maximoff                                                                    |
| **randomFirstName** | A random first name, regenerated every time this value is called.                                  | Henry                                                                             |
| **randomLastName**  | A random last name, regenerated every time this value is called.                                   | Osborn                                                                            |
| **randomEmail**     | A random email in the format <firstname.lastname@mock.does.qa>.                                    | <happy.hogan@mock.does.qa>                                                        |
| **randomPhoneUK**   | A randomly generated UK Phone Number in the format "##### ### ###".                                | 01190 123 456                                                                     |
| **randomPhoneUS**   | A randomly generated US Phone Number in the format "(###) ###-###".                                | (123) 456-789                                                                     |
| **randomZipCode**   | A random US Zip code.                                                                              | 45874                                                                             |
