-
Notifications
You must be signed in to change notification settings - Fork 18
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
test: Collect client test data from E2E tests (DSP-724) #1724
Conversation
- Add script to download the test data as a Zip file.
- Move request templates from SharedTestDataADM into ResourcesRouteV2E2ESpec.
…ab-basel/Knora into wip/DSP-724-client-test-data
…ab-basel/Knora into wip/DSP-724-client-test-data
…ch-swiss/knora-api into wip/DSP-724-client-test-data
… e2e tests + add missing tests
When you add a separate Makefile target for the generation of the client-test-data, maybe it would also make sense to add an additional Github-CI job for this target? |
I thought of that, but the problem is as I wrote above: if Redis isn't running, the E2E tests will fail, because |
I guess I could do it with an environment variable... |
You could add a KnoraSetting, which could be configured through an environment variable. The default could be |
@benjamingeer if you need help, I could quickly add the environment variable part. Just let me now. |
@benjamingeer @SepidehAlassi There is an e2e test, which responses should also be gathered: https://github.com/dasch-swiss/knora-api/blob/wip/DSP-724-client-test-data/webapi/src/test/scala/org/knora/webapi/e2e/HealthRouteE2ESpec.scala |
Regarding the health route, @tobiasschweizer would like that the data goes into a |
Let's do that in a separate PR. |
Just wanted to suggest that. There is a new Youtrack story: https://dasch.myjetbrains.com/youtrack/issue/DSP-743 |
I implemented it in fd0d3cf, but it doesn't work: |
sure, will do after lunch |
@benjamingeer the generation works now. |
Excellent, thank you! Could you give me a hint about how to do this:
|
OK I figured it out. I think that's everything you asked for. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks for the work!
@subotic Thanks for the review and the help! |
To generate client test data, type: | ||
|
||
``` | ||
make test-e2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benjamingeer I believe this had to be updated to make client-test-data
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sorry, I forgot that.
When the tests have finished running, you will find the file | ||
`client-test-data.zip` in the current directory. | ||
|
||
If generated client test data changes, run `make test-e2e`, then run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, this has to be make client-test-data
, right? If so, I can update this documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you.
resolves DSP-724
ClientTestDataCollector
class that E2E tests can use.SharedTestDataADM
into E2E tests:ResourcesRouteV2
->ResourcesRouteV2E2ESpec
OntologiesRouteV2
->OntologyV2R2RSpec
ValuesRouteV2
->ValuesRouteV2E2ESpec
SearchRouteV2
->SearchRouteV2R2RSpec
ListsRouteV2
->ListsRouteV2R2RSpec
UsersRouteADM
->UsersADME2ESpec
GroupsRouteADM
->GroupsADME2ESpec
ProjectsRouteADM
->ProjectsADME2ESpec
PermissionsRouteADM
->PermissionsADME2ESpec
ListsRouteADM
->ListsADME2ESpec
docker-compose.yml
.main
totest
.