-
TL;DR: Can I write a captured cookie to a file? (and then use that file for a different hurl call)? How can I chain captures betwen multiple files eg. I'm trying to use hurl for building an integration test suite. I like to separate login from other test cases. How can I separate out the login procedure and share it subsequently with other executions? I tried two approaches:
How would I be able to use a "multi-file" approach? How would I be able to share a login between different testing flows? Or is Background: Idea is something like:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Some progress I found this issue thread. It offered these ideas:
That alleviates some of the issues. I realized though that I might need to create loops and templating, so I need some more power then In the meantime I also found out that hurl --verbose login.hurl 2>&1 | grep -A 1 "\* Captures" | tail -n +2 | awk -F awk -F '[ :]' '{print "export HURL_"$2"="$4}'
export HURL_session-id=cafebabecafebabe
(and increase |
Beta Was this translation helpful? Give feedback.
-
Hi @oschrenk There are other possibilities to share data between tests:
Things to note:
|
Beta Was this translation helpful? Give feedback.
Hi @oschrenk
There are other possibilities to share data between tests:
--cookie
and--cookie-jar
: these options allow you to save and restore cookies so you can "simulate" a session based test across filed--json
: this option exports a run result as structured data; you can get a JSON result with headers, captures , cookies etc...Things to note:
--test
, Hurl files will be run in parallel to speed up the execution. It you rely on execution order, tou c…