├── .ruby-version ├── CNAME ├── .ruby-gemset ├── .well-known └── appspecific │ └── com.chrome.devtools.json ├── .github └── CODEOWNERS ├── assets ├── css │ ├── docs.scss │ ├── tutorial.scss │ ├── community.scss │ └── styles.scss └── images │ ├── cover.jpg │ ├── tests.png │ ├── red-hat-logo.png │ ├── lambdatest-logo.png │ ├── scanapi-report.png │ ├── logo-white-on-transparent.png │ ├── tutorial │ ├── step03 │ │ ├── report-1.png │ │ ├── report-2.png │ │ └── report-3.png │ ├── step05 │ │ ├── report-1.png │ │ ├── report-2.png │ │ └── report-3.png │ ├── step06 │ │ ├── report-1.png │ │ └── report-2.png │ ├── step07 │ │ ├── report-1.png │ │ ├── report-2.png │ │ ├── report-3.png │ │ ├── report-4.png │ │ ├── report-5.png │ │ ├── report-6.png │ │ ├── report-7.png │ │ └── report-8.png │ ├── step11 │ │ └── report-1.png │ ├── step02 │ │ ├── registration.png │ │ ├── calculator-highlight.png │ │ └── registration-complete.png │ ├── step04 │ │ ├── report-tests.png │ │ └── report-tests-summary.png │ ├── step12 │ │ └── report-csv.png │ └── step13 │ │ ├── circleci-setup.png │ │ ├── circleci-workflow-1.png │ │ ├── circleci-workflow-2.png │ │ ├── circleci-workflow-3.png │ │ ├── github-action-overview.png │ │ ├── github-action-pipeline.png │ │ └── github-action-artifacts.png │ ├── twitter.svg │ ├── scanapi.svg │ ├── api.svg │ ├── git.svg │ ├── discord-logo.svg │ ├── github-logo.svg │ ├── confirm.svg │ └── dependency.svg ├── _data ├── doc_sections.yml └── navigation.yml ├── _config.yml ├── CODE_OF_CONDUCT.md ├── _layouts ├── community.html ├── docs.html ├── tutorial.html └── default.html ├── CONTRIBUTING.md ├── Gemfile ├── _sass ├── community.scss ├── docs.scss ├── tutorial.scss ├── syntax_highlight.scss ├── github.scss ├── _reset.scss └── _main.scss ├── _docs_v1 ├── specification │ ├── retry.md │ ├── custom_variables.md │ ├── environment_variables.md │ ├── python_code.md │ ├── chaining_requests.md │ ├── api_spec_in_multiple_files.md │ ├── api_specification_keys.md │ └── basic_structure.md └── configuration │ ├── config_file.md │ ├── scanapi_cli.md │ ├── hiding_sensitive_information.md │ └── custom_report.md ├── _tutorials ├── step01.md ├── step11.md ├── step06.md ├── step04.md ├── step12.md ├── step03.md ├── step10.md ├── step08.md ├── step05.md ├── step02.md ├── step09.md ├── step13.md └── step07.md ├── LICENSE ├── docs.md ├── .gitignore ├── README.md ├── Gemfile.lock ├── community.md ├── _includes ├── footer.html └── navigation.html └── index.html /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.4.1 2 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | scanapi.dev 2 | -------------------------------------------------------------------------------- /.ruby-gemset: -------------------------------------------------------------------------------- 1 | scanapi-website 2 | -------------------------------------------------------------------------------- /.well-known/appspecific/com.chrome.devtools.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @scanapi/core-team @scanapi/maintaners 2 | -------------------------------------------------------------------------------- /assets/css/docs.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | @import "syntax_highlight"; 4 | @import "github"; 5 | -------------------------------------------------------------------------------- /assets/css/tutorial.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | @import "syntax_highlight"; 4 | @import "github"; 5 | -------------------------------------------------------------------------------- /assets/images/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/cover.jpg -------------------------------------------------------------------------------- /assets/images/tests.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tests.png -------------------------------------------------------------------------------- /_data/doc_sections.yml: -------------------------------------------------------------------------------- 1 | - name: Getting Started 2 | - name: Specification 3 | - name: Configuration 4 | -------------------------------------------------------------------------------- /assets/css/community.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | @import "syntax_highlight"; 5 | @import "github"; 6 | -------------------------------------------------------------------------------- /assets/images/red-hat-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/red-hat-logo.png -------------------------------------------------------------------------------- /assets/images/lambdatest-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/lambdatest-logo.png -------------------------------------------------------------------------------- /assets/images/scanapi-report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/scanapi-report.png -------------------------------------------------------------------------------- /assets/images/logo-white-on-transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/logo-white-on-transparent.png -------------------------------------------------------------------------------- /assets/images/tutorial/step03/report-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step03/report-1.png -------------------------------------------------------------------------------- /assets/images/tutorial/step03/report-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step03/report-2.png -------------------------------------------------------------------------------- /assets/images/tutorial/step03/report-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step03/report-3.png -------------------------------------------------------------------------------- /assets/images/tutorial/step05/report-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step05/report-1.png -------------------------------------------------------------------------------- /assets/images/tutorial/step05/report-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step05/report-2.png -------------------------------------------------------------------------------- /assets/images/tutorial/step05/report-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step05/report-3.png -------------------------------------------------------------------------------- /assets/images/tutorial/step06/report-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step06/report-1.png -------------------------------------------------------------------------------- /assets/images/tutorial/step06/report-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step06/report-2.png -------------------------------------------------------------------------------- /assets/images/tutorial/step07/report-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step07/report-1.png -------------------------------------------------------------------------------- /assets/images/tutorial/step07/report-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step07/report-2.png -------------------------------------------------------------------------------- /assets/images/tutorial/step07/report-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step07/report-3.png -------------------------------------------------------------------------------- /assets/images/tutorial/step07/report-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step07/report-4.png -------------------------------------------------------------------------------- /assets/images/tutorial/step07/report-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step07/report-5.png -------------------------------------------------------------------------------- /assets/images/tutorial/step07/report-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step07/report-6.png -------------------------------------------------------------------------------- /assets/images/tutorial/step07/report-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step07/report-7.png -------------------------------------------------------------------------------- /assets/images/tutorial/step07/report-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step07/report-8.png -------------------------------------------------------------------------------- /assets/images/tutorial/step11/report-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step11/report-1.png -------------------------------------------------------------------------------- /assets/images/tutorial/step02/registration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step02/registration.png -------------------------------------------------------------------------------- /assets/images/tutorial/step04/report-tests.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step04/report-tests.png -------------------------------------------------------------------------------- /assets/images/tutorial/step12/report-csv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step12/report-csv.png -------------------------------------------------------------------------------- /assets/images/tutorial/step13/circleci-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step13/circleci-setup.png -------------------------------------------------------------------------------- /assets/images/tutorial/step13/circleci-workflow-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step13/circleci-workflow-1.png -------------------------------------------------------------------------------- /assets/images/tutorial/step13/circleci-workflow-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step13/circleci-workflow-2.png -------------------------------------------------------------------------------- /assets/images/tutorial/step13/circleci-workflow-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step13/circleci-workflow-3.png -------------------------------------------------------------------------------- /assets/images/tutorial/step02/calculator-highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step02/calculator-highlight.png -------------------------------------------------------------------------------- /assets/images/tutorial/step02/registration-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step02/registration-complete.png -------------------------------------------------------------------------------- /assets/images/tutorial/step04/report-tests-summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step04/report-tests-summary.png -------------------------------------------------------------------------------- /assets/images/tutorial/step13/github-action-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step13/github-action-overview.png -------------------------------------------------------------------------------- /assets/images/tutorial/step13/github-action-pipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step13/github-action-pipeline.png -------------------------------------------------------------------------------- /assets/images/tutorial/step13/github-action-artifacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanapi/website/HEAD/assets/images/tutorial/step13/github-action-artifacts.png -------------------------------------------------------------------------------- /_data/navigation.yml: -------------------------------------------------------------------------------- 1 | - name: Home 2 | link: / 3 | - name: Docs 4 | link: /docs.html 5 | - name: Tutorial 6 | link: /tutorials/step01.html 7 | - name: Community 8 | link: /community.html 9 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | collections: 2 | tutorials: 3 | output: true 4 | docs_v1: 5 | output: true 6 | 7 | markdown: kramdown 8 | 9 | kramdown: 10 | input: GFM 11 | syntax_highlighter: rouge 12 | 13 | sass: 14 | quiet_deps: true 15 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | As one of the repositories under the `scanapi` GitHub organization, this repository follows the 4 | [ScanAPI Code of Conduct](https://github.com/scanapi/contributors/blob/main/CODE_OF_CONDUCT.md). 5 | -------------------------------------------------------------------------------- /_layouts/community.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: ScanAPI - Community 4 | --- 5 | 6 | 10 |
37 |
42 |
39 |
44 |
47 |
52 |
51 |
56 |
61 |
37 |
42 |
53 |
58 |
64 |
69 |
57 |
62 |
67 |
72 |
90 |
95 |
108 |
113 |
118 |
123 |
128 |
133 |
38 |
43 |
75 |
80 |
85 |
90 |
Report Generated at: {{now}}
53 | ``` 54 | 55 | {% endraw %} 56 | 57 | ### session 58 | 59 | The object responsible to store the ScanAPI run information. 60 | 61 | #### successes 62 | 63 | The number of `test_results` that succeed in the session. 64 | 65 | For example: 66 | 67 | {% raw %} 68 | 69 | ```jinja 70 | Number of PASSED: {{session.successes}} 71 | ``` 72 | 73 | {% endraw %} 74 | 75 | #### failures 76 | 77 | The number of `test_results` that failed in the session. 78 | 79 | For example: 80 | 81 | {% raw %} 82 | 83 | ```jinja 84 | Number of FAILURES: {{session.failures}} 85 | ``` 86 | 87 | {% endraw %} 88 | 89 | #### errors 90 | 91 | The number of `test_results` that got an error in the session. 92 | 93 | {% raw %} 94 | 95 | ```jinja 96 | Number of ERRORS: {{session.errors}} 97 | ``` 98 | 99 | {% endraw %} 100 | 101 | #### exit_code 102 | 103 | The exit code returned by the ScanAPI process. 104 | 105 | {% raw %} 106 | 107 | ```jinja 108 | The script returned the exit code: {{session.exit_code}} 109 | ``` 110 | 111 | {% endraw %} 112 | 113 | #### started_at 114 | 115 | The datetime when ScanAPI started to run. 116 | 117 | ```jinja 118 | {% raw %}Started at: {{ session.started_at }}{% endraw %} 119 | ``` 120 | 121 | #### elapsed_time() 122 | 123 | The elapsed time since the session started. 124 | 125 | {% raw %} 126 | 127 | ```jinja 128 | Total Time: {{ session.elapsed_time() }} 129 | ``` 130 | 131 | {% endraw %} 132 | 133 | ### results 134 | 135 | A [generator object][generator] containing results for each request. Each result contains the 136 | information for a request. 137 | 138 | {% raw %} 139 | 140 | ```jinja 141 | {% for result in results -%} 142 | ... 143 | {% endfor %} 144 | ``` 145 | 146 | {% endraw %} 147 | 148 | #### response 149 | 150 | The [Response object][requests_response] which contains the server’s response to the HTTP request. 151 | 152 | {% raw %} 153 | 154 | ```jinja 155 | {% for result in results -%} 156 | {% set response = result.response %} 157 | {% set request = response.request %} 158 | 159 |Full URL: {{request.url}}
160 |Response Status Code: {{ response.status_code }}
161 | {% endfor %} 162 | ``` 163 | 164 | {% endraw %} 165 | 166 | #### no_failure 167 | 168 | A boolean that indicates if the tests for the request didn't get any failure. True if there are no 169 | failures or errors. False if there is any failure or error. 170 | 171 | {% raw %} 172 | 173 | ```jinja 174 | {% for result in results -%} 175 | {% set endpoint_status_label = "PASS" if result.no_failure else "FAIL" %} 176 | 177 |Status: {{ endpoint_status_label }}
178 | {% endfor %} 179 | ``` 180 | 181 | {% endraw %} 182 | 183 | #### tests_results 184 | 185 | A list object containing the results for each test. Each result contains the information of a 186 | test for the request. 187 | 188 | {% raw %} 189 | 190 | ```jinja 191 | {% for result in results -%} 192 | {% set tests = result.tests_results %} 193 | 194 | {% for test in tests -%} 195 | ... 196 | {% endfor %} 197 | {% endfor %} 198 | ``` 199 | 200 | {% endraw %} 201 | 202 | ##### name 203 | 204 | The name of the test defined in the API specification. 205 | 206 | {% raw %} 207 | 208 | ```jinja 209 | {% for result in results -%} 210 | {% set tests = result.tests_results %} 211 | 212 | {% for test in tests -%} 213 |Test Name: {{ test.name }}
214 | {% endfor %} 215 | {% endfor %} 216 | ``` 217 | 218 | {% endraw %} 219 | 220 | ##### status 221 | 222 | The status of the test result. One of the values: `"passed"`, `"failed` or `"error"`. 223 | 224 | {% raw %} 225 | 226 | ```jinja 227 | {% for result in results -%} 228 | {% set tests = result.tests_results %} 229 | 230 | {% for test in tests -%} 231 |Test Name: {{ test.name }}
232 |Test Status: {{test.status|upper}}
233 | {% endfor %} 234 | {% endfor %} 235 | ``` 236 | 237 | {% endraw %} 238 | 239 | ##### failure 240 | 241 | The assertion sentence that failed. It will be empty if there is no failure. 242 | 243 | {% raw %} 244 | 245 | ```jinja 246 | {% for result in results -%} 247 | {% set tests = result.tests_results %} 248 | 249 | {% for test in tests -%} 250 |Test Name: {{ test.name }}
251 |Test Status: {{test.status|upper}}
252 | {% if test.failure %} 253 | {{test.failure}} is false 254 | {% endif %} 255 | {% endfor %} 256 | {% endfor %} 257 | ``` 258 | 259 | {% endraw %} 260 | 261 | ##### error 262 | 263 | The exception thrown in the test. It will be empty if there is no error. 264 | 265 | {% raw %} 266 | 267 | ```jinja 268 | {% for result in results -%} 269 | {% set tests = result.tests_results %} 270 | 271 | {% for test in tests -%} 272 |Test Name: {{ test.name }}
273 |Test Status: {{test.status|upper}}
274 | {% if test.error %} 275 | An error occurred: {{test.error}} 276 | {% endif %} 277 | {% endfor %} 278 | {% endfor %} 279 | ``` 280 | 281 | {% endraw %} 282 | 283 | ## Running ScanAPI with Custom Report 284 | 285 | After creating your report template, now you can run ScanAPI using it. For example: 286 | 287 | ```shell 288 | $ scanapi run -t my_template.html 289 | ``` 290 | 291 | And that is it! Now ScanAPI will use you custom template `my_template.html` instead of the default 292 | one. 293 | 294 | Also, if you want to check, this is the [default template code][default_template], it might help 295 | you! 296 | 297 | [config_file]: https://scanapi.dev/docs_v1/configuration/config_file.html 298 | [default_template]: https://github.com/scanapi/scanapi/blob/main/scanapi/templates/report.html 299 | [generator]: https://wiki.python.org/moin/Generators 300 | [jinja]: https://jinja.palletsprojects.com/en/2.11.x/ 301 | [requests_response]: https://docs.python-requests.org/en/latest/api/#requests.Response 302 | -------------------------------------------------------------------------------- /_includes/navigation.html: -------------------------------------------------------------------------------- 1 |
144 |
149 |
154 |
159 |
164 |
169 |
244 |
249 |
310 |
315 |
318 |
323 |
328 |
333 |
69 |
74 |
77 |
82 |
146 |
151 |
154 |
159 |
164 |
169 |
189 |
194 |
267 |
272 |
364 |
369 |
22 | Guarantee the quality of the data that is being consumed or used. 23 | Ensure that communication between services is occurring as expected. 24 | Ensure the system does, in fact, what it should do. 25 |
26 |31 | Use the response of the previous request to build the next. 32 | Making it easy to debug complex scenarios of chained requests. 33 |
34 |39 | ScanAPI will keep your API documentation always updated. 40 | No more misinformation or outdated documentation. 41 |
42 |47 | Keep your API tests and docs as code. Store specs and configs in your repository, review changes via pull requests, and run everything reproducibly in CI/CD. 48 |
49 |Generate comprehensive, interactive HTML reports automatically with every test run.
57 | 58 |Test your API endpoints with confidence using a simple, declarative specification syntax.
91 | 92 |
120 | 123 | ScanAPI is proud to be selected as one of the 71 important open source projects in the second cohort of the GitHub Secure Open Source Fund. 124 |
125 |126 | This initiative supports critical open source projects in securing their supply chains and improving security practices. Being part of this program helps us deliver a more secure and reliable tool for the community. 127 |
128 | 129 |Enhanced security measures and best practices
134 |Securing dependencies and build processes
139 |Building confidence in open source software
144 |156 | ScanAPI is built and maintained by a passionate community of open source contributors from around the world. 157 |
158 |Join our community and help make ScanAPI even better!
195 | 199 |207 | We are grateful for the support of our backers over time. Their contributions have been instrumental in helping us maintain and improve ScanAPI. 208 |
209 | 210 |Your support helps us keep the project alive and growing.
221 | Become a Backer 222 |