-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'update-docs-2024-04-30' into 'main'
Update documentation See merge request documentation/uilicious-docs-v3!46
- Loading branch information
Showing
8 changed files
with
127 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
--- | ||
# Write a short description about the page. This will be displayed on google search results. | ||
description: List of IP that UIlicious uses when running tests. | ||
description: List of IP to whitelist that UIlicious uses when running tests. | ||
--- | ||
|
||
# Uilicious Cloud IP List | ||
# Whitelisting IP addresses for UI-licious Cross-Browser Testing | ||
|
||
{% hint style="info" %} | ||
**Good to know:** This is applicable only to UI-licious Cloud users. If you are using UI-licious On Premise, please check with your System Administrator. | ||
This guide is only for UI-licious cloud customer. If you are using a self-hosted installation of UI-licious, please contact your system administrator. | ||
{% endhint %} | ||
|
||
If you want to filter traffic from the UI-licious test servers (e.g. to disabling Sign In 2FA, or to exclude UI-licious traffic from analytics), here are the list of static IP addresses that UI-licious will run your tests from: | ||
If you are using UI-licious for cross-browser testing, you may need to whitelist our IP addresses to ensure the test browsers can access your application, or to to disable ReCapcha, Two-Factor Authentication (2FA), or analytics specifically for traffic originating from the UI-licious testing grid. | ||
|
||
Here's the list of static IP addresses from which UI-licious will run your tests: | ||
|
||
``` | ||
104.248.143.86 | ||
|
@@ -31,3 +33,12 @@ If you want to filter traffic from the UI-licious test servers (e.g. to disablin | |
188.166.156.193 | ||
64.227.33.68 | ||
``` | ||
|
||
## Troubleshooting: 502 Bad Gateway Errors | ||
|
||
If you encounter **502 Bad Gateway** errors when the test browser attempts to navigate to your application, it could indicate that the application is inaccessible due to network restrictions. To resolve this: | ||
|
||
1. **Check Network Access Rules**: If your website is behind a firewall, ensure that the IP addresses provided are whitelisted in your network access rules. | ||
2. **Check Public Accessibility**: If your website is not behind a firewall, check that your website is publicly accessible on the internet. | ||
|
||
If the 502 errors persist even after whitelisting the IP addresses or if your website is publicly accessible, please contact [our support team](mailto:[email protected]) for further assistance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
# Write a short description about the page. This will be displayed on google search results. | ||
description: Learn how to print custom information or validation messages to the UI-licious test report. | ||
--- | ||
|
||
# Custom validation and log messages | ||
|
||
This article covers commands that allow you to print custom informational or validation messages to the test report. | ||
|
||
Thera are 4 useful commands for printing custom messages: | ||
- `TEST.log.info` - Print an information message to the test report | ||
- `TEST.log.pass` - Print a message to the test report, with a **success** status | ||
- `TEST.log.fail` - Print a message to the test report, with a **failure** status, causing the whole test run to fail | ||
- `TEST.assert` - Checks a condition, and prints either a **success** or **failure** status message depending on the condition | ||
|
||
## Usage | ||
|
||
```javascript | ||
// TEST.log methods accept a single parameter: | ||
// - message: the message to print to the test report | ||
TEST.log.info(message) | ||
TEST.log.pass(message) | ||
TEST.log.fail(message) | ||
|
||
// TEST.assert accept two parameters: | ||
// - condition : condition to validate, this should be an expression that evaluates to a boolean value | ||
// - message: the validation message to print to the test report | ||
// - errorMessage: (optional) the error message to print if the condition fails | ||
TEST.assert(condition, message) | ||
TEST.assert(condition, message, errorMessage) | ||
``` | ||
|
||
## Using TEST.log for custom logging | ||
|
||
Here's an example showing how custom logs can be used to perform custom validation. | ||
|
||
```javascript | ||
TEST.log.info("Test Case #102 : Catalog should show at least 10 products") | ||
|
||
let count = I.getCount(".product-card") | ||
|
||
if (count >= 10) { | ||
TEST.log.pass("Catalog has at least 10 products.") | ||
} else { | ||
TEST.log.fail("Catalog has less than 10 products!") | ||
} | ||
``` | ||
|
||
In this example above, the test script uses `TEST.log.info` to print a reference to a test case number. It then counts the number of `.product-card` elements on the page, validates if there is at least 10 elements, and prints either a success or failure message using `TEST.log.pass` and `TEST.log.fail` respectively. | ||
|
||
|
||
{% tabs %} | ||
{% tab title="Demo" %} | ||
<iframe src="https://snippet.uilicious.com/embed/test/public/LTXpHdGsnScXhi8EiKqN9a?stepNum=5&autoplay=0" frameborder="0" width="100%" height="400px;"></iframe> | ||
|
||
[View source](https://snippet.uilicious.com/test/public/LTXpHdGsnScXhi8EiKqN9a?step=5) | ||
{% endtab %} | ||
{% endtabs %} | ||
|
||
|
||
## Using TEST.assert for custom validation and logging | ||
|
||
This previous test script can be simplified using the `TEST.assert` command to replace the if-else block: | ||
|
||
```javascript | ||
TEST.log.info("Test Case #102 : Catalog should show at least 10 products") | ||
|
||
let count = I.getCount(".product-card") | ||
|
||
TEST.assert(count >= 10, "Catalog has at least 10 products.", "Found only " + count + "products in the catalog") | ||
``` | ||
|
||
{% tabs %} | ||
{% tab title="Demo" %} | ||
<iframe src="https://snippet.uilicious.com/embed/test/public/AE3iRxPSQNQw7Jw5HAWZqa?stepNum=7&autoplay=0" frameborder="0" width="100%" height="400px;"></iframe> | ||
|
||
[View source](https://snippet.uilicious.com/test/public/AE3iRxPSQNQw7Jw5HAWZqa?step=7) | ||
{% endtab %} | ||
{% endtabs %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters