snapshot testing #1385
Replies: 3 comments 6 replies
-
Hi @chenrui333 , One way to test a snaphot version would be to run Hurl's integration suite tests. These tests are run for each commit on the GitHub CI/CD but can also be easily locally executed. Your can find these tests under integration/:
Each integration test consists of:
Some files are optional (tests under To run and test the integration suite, you will need Python 3.9+. The simplest way is to create a Python virtual environment: $ python3 -m venv .venv
$ source .venv/bin/activate Then start the test local servers for the test suite: $ ./bin/test/test_prerequisites.sh Once the script is launched, you can execute the test suite:
This script will run and tests all integration tests. The $ export PATH=/Users/jc/Documents/Dev/hurl/target/debug:$PATH and rerun the tests suite:
Of course, you also have units tests that can be executed like this:
Just keep in mind that there is currently some work to streamline the current integration workflow but the idea will still be to have a big suite of Hurl files and to test those extensively. |
Beta Was this translation helpful? Give feedback.
-
I am mostly think like jest snapshot testing so that I can capture the tests as like a dump kind of thing, it would be easy for auditing as well, let me know if that makes sense. :) |
Beta Was this translation helpful? Give feedback.
-
by the way, I am starting to do the similar things like you did over the last three years, do you have practice guide against different environments? |
Beta Was this translation helpful? Give feedback.
-
Any helper or tools that you can think of or recommend to help with snapshot testing? Thanks!!
Beta Was this translation helpful? Give feedback.
All reactions