pyDataverse
pyDataverse copied to clipboard
Implement test strategy for API tests
Prepare
- [x] Risk Assessment #82
- [ ] Test Strategy #70
- [ ] Work out testdata #84
- [ ] Read Dataverse API docs
- [ ] Check out
ǹotes_api.md
Steps
- [x] Get test base directory as variable
- [ ] create query strings by hand, as in helper functions.
- [ ] Passing empty string as base_url should create an error
- [ ] token = None oder empty sollte auch einen error werfen
- [ ] Use
@pytest.mark.skipif()whenos.getenv(TRAVIS) == True - [ ] Run tests
- [ ] Update test strategy
- [ ] Docs
- [ ] Endpoint availability
- [ ] Define Tests
- [ ] Prioritize behavior to be tested and define tests for it
- [ ] Define test data for each test: input data, expected
- [ ] Define fixtures
- [ ] Prioritize behavior to be tested and define tests for it
- [ ] Check: private information in VCR cassettes: API Token,
- [ ] Remove old JSON test data files
- [ ] Update Test Strategy #70
- [ ]
pytest pandasgeht.pytest pyDataversemachen!
Write fixtures
- [ ] Fixtures
- [ ] Docs
- [ ] define scope for each fixture, if not default.
- [ ] for all input data
Fixtures:
native_apidataaccess_apimetrics_apisearch_apiget_info_version- setup
- native_api
- setup
- Create Dataverse
- Scope
- setup
- create_dataverse()
- teardown
- delete_dataverse()
- Create Dataset min
- Scope
- setup
- create_dataset()
- teardown
- delete_dataset()
- Publish Dataset
- Scope
- setup
- Create Dataset
- publish_dataset()
- teardown
- destroy_dataset()
- Upload Datafile
- Scope
- setup
- upload_datafile()
- teardown
- delete_datafile()
Write tests
- check out
notes_api.md - different test-cases
Review
- [ ] Risk Assessment
- [ ] Content
- [ ] Documentation
Follow Ups
- [ ] Review Test Strategy #70
- [ ] Review test data:
- [ ] data
- [ ] docs
- [ ] Review Risk Assessment
- [ ] Re-factor API tests
- [ ] add new tests
As discussed during the 2024-02-14 meeting of the pyDataverse working group, we are closing old milestones in favor of a new project board at https://github.com/orgs/gdcc/projects/1 and removing issues (like this one) from those old milestones. Please feel free to join the working group! You can find us at https://py.gdcc.io and https://dataverse.zulipchat.com/#narrow/stream/377090-python