authorjapps / authorjapps/zerocode

Does zerocode offer a test setup?

Open
#586 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1k
Forks
453
Avg merge
7d 2h
Merged PRs (30d)
5

Description

Is there a way i can do a test setup or testsuite setup like BeforeAll in Java and write to some variables that i can use in the tests and the config? I want to run the tests on a resource that i create for the test suite, before running the tests, so each test needs to have access to the id of the resource i created for the test suite. Then when the tests are through, i need to clean up the resource.
I have this scenario:
Setup:
1. Make a POST call to the API to create test resource - > get the ID of this resource
2. Make a call to API to get configuration for the resource-> get config parameters
3. Use the config parameters and fill in properties file that will be used for testing

Test 1. Make GET call to API to get the resource with the ID and verify some fields
Test 2. Do some actions on the resource that require the use of the properties file with the queried parameters (step 2 of Setup)

I have seen the hello_world_jsonfile_as_part_payload.json file from the hello-world example but i need the resource id in all scenarios.

Is there a way i can achieve the setup from above?

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.