About Testlum
Getting Started
UI Testing
Api Testing
Database Testing
Services Testing
Additional Materials
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Regular Expressions
Copy Markdown
Open in ChatGPT
Open in Claude
While comparing actual and expected files, some dynamical values might appear. For instance, in actual file with results of HTTP or SQL query (IDs, timestamp, etc). To avoid exception while comparison, you can use the following list of regular expression:
| name | pattern |
|---|---|
| p(any) | any sequence of any symbols |
| p(digit) | integer value (1,2,3,4,5...) |
| p(money) | float value (100.10, 532.83...) |
| p(email) | example123@gmail.com |
| p(ip) | 10.10.10.10 |
| p(url) | http://google.com |
| p(uuid) | 550e8400-e29b-41d4-a716-446655440000 |
| p(color) | #1f1f1f |
| p(y-m-d) | 2015-11-12 |
| p(d-m-y) | 12-11-2015 |
| p(notEmpty) | any symbols but not empty |
Here is an example of using regular expressions in expected file:
JSON
{ "id": "p(digit)", "token": "p(any)"}Also, we can set condition for our expected value. For instance:
| condition | description |
|---|---|
| c(>100) | any integer value more than 100 |
| c(>-111.11) | any float value more than -111.11 |
| c(<=145387) | any integer value lower than or equal to 145387 |
| c(>2001-02-16 20:00:00) | any timestamp after 2001-02-16 20:00:00 |
| c(<=now) | any timestamp before or equal to the current timestamp |
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
Last updated on
Next to read:
Symbols escapingCopyright © Knubisoft
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message