-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Then steps in API acceptance tests #39512
Labels
Comments
Whoever starts this, please do an initial PR that just adjusts a single API feature file. Then we can all review and discuss to make sure we choose a "best" way forward. |
This was referenced Nov 22, 2021
Note: there are some simple examples done for disable-user tests at commit 6e5eb23 |
11 tasks
@grgprarup is working on this |
Merged
11 tasks
11 tasks
10 tasks
10 tasks
10 tasks
11 tasks
Merged
11 tasks
11 tasks
11 tasks
11 tasks
10 tasks
11 tasks
11 tasks
This was referenced Feb 28, 2022
10 tasks
11 tasks
11 tasks
11 tasks
This was referenced Apr 8, 2022
11 tasks
11 tasks
11 tasks
11 tasks
11 tasks
This was referenced Apr 19, 2022
11 tasks
10 tasks
11 tasks
11 tasks
11 tasks
11 tasks
finally done! great work @SagarGi, @amrita-shrestha, @grgprarup and @sushmita56 👑 👍 |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We run the core API acceptance tests in various different environments including:
owncloud/core
owncloud/ocis
which has a completely different server-under-testcs3org/reva
which has a completely different server-under-testWhen
steps are expected to run just theWhen
action, and not fail. The laterThen
steps in the scenario should check the result of theWhen
step. We do this because:When
step is expected to sometimes give a "bad" HTTP status. For example, if dome with a valid user the API request returns 2xx, if done with a non-existent user it gives a 4xx. So theWhen
step code cannot and should not guess if a 4xx is "a bad thing".When
action. So writing out the expected HTTP status, and something about the expected request body etc in separateThen
steps is useful for people who read the scenario. (rather than hiding this inside the test code as "assumed knowledge")Issue owncloud/ocis#1420 has a discussion about this. In that case the scenario did not have
Then
steps to check the HTTP status. The test for public link access failed, and it was not clear that actually theWhen
step failed completely.ToDo: add
Then
steps to existing API test scenarios to better check the results ofWhen
steps.The text was updated successfully, but these errors were encountered: