Skip to content
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

[functional testing] Add external testing of API endpoints #4030

Open
redshiftzero opened this issue Jan 12, 2019 · 2 comments
Open

[functional testing] Add external testing of API endpoints #4030

redshiftzero opened this issue Jan 12, 2019 · 2 comments

Comments

@redshiftzero
Copy link
Contributor

Description

Once we have external server testing in CI, we should add some integration testing of the API endpoints. This would have enabled CI to catch bugs #3977, #3877, and #3772.

One idea to do this (which also gets us better testing of securedrop-sdk), would be to just run the securedrop-sdk test cases from the latest SDK release without using the vcrpy cassettes. There may need to be a modification to the test cases that e.g. delete from the staging server.

Blocked by: #3661

Comment

One we have the external server tests in #3661 and from this issue, I think it makes sense to run all those tests in a nightly CI job (as we've discussed in the past) against a staging server - both API and Selenium tests. Otherwise we end up with much slower CI and a difficult situation when we try to upgrade securedrop-sdk and the API together, which we often want to do.

@emkll
Copy link
Contributor

emkll commented Jan 14, 2019

OWASP's ZAP[0] tool also offers the ability to scan APIs based on an OpenAPI definition [1]. I have created an initial definition of the existing Journalist API [2].

[0] : https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project
[1] : https://zaproxy.blogspot.com/2017/06/scanning-apis-with-zap.html
[2] : https://gist.github.com/emkll/6c1704100db372371a99f90d3197db45

@redshiftzero
Copy link
Contributor Author

redshiftzero commented Jan 24, 2019

We should do this testing in a nightly job. using the latest SDK would detect divergence between the API and SDK: e.g. freedomofpress/securedrop-sdk#55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants