Skip to content

Add tests results to html report#177

Merged
camilamaia merged 4 commits intomasterfrom
session
Jun 21, 2020
Merged

Add tests results to html report#177
camilamaia merged 4 commits intomasterfrom
session

Conversation

@camilamaia
Copy link
Copy Markdown
Member

@camilamaia camilamaia commented Jun 13, 2020

  • Show a tests summary in the HTML report
  • Show each test result in the html report
  • Small refactor on Reporter

Current this is how it is rendered: https://github.com/scanapi/scanapi/blob/adr2/testing_reports/current.html

report
report2

But we are still discussing better how we are going to present it #161 . We can improve it later in the next PRs.

Closes #169
Closes #167

@github-actions
Copy link
Copy Markdown

@camilamaia your pull request is missing a changelog!

@camilamaia camilamaia force-pushed the session branch 2 times, most recently from 69df081 to 5e873a0 Compare June 14, 2020 18:26
@camilamaia camilamaia changed the base branch from master to remove-markdown June 14, 2020 18:27
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 14, 2020

Codecov Report

Merging #177 into master will increase coverage by 1.75%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #177      +/-   ##
==========================================
+ Coverage   91.92%   93.68%   +1.75%     
==========================================
  Files          14       16       +2     
  Lines         508      538      +30     
==========================================
+ Hits          467      504      +37     
+ Misses         41       34       -7     
Impacted Files Coverage Δ
scanapi/main.py 100.00% <100.00%> (ø)
scanapi/reporter.py 100.00% <100.00%> (+20.68%) ⬆️
scanapi/scan.py 100.00% <100.00%> (ø)
scanapi/session.py 100.00% <100.00%> (ø)
scanapi/template_render.py 100.00% <100.00%> (ø)
scanapi/tree/request_node.py 98.30% <100.00%> (+1.75%) ⬆️
scanapi/tree/testing_node.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b6158c1...edff481. Read the comment docs.

@camilamaia camilamaia force-pushed the session branch 4 times, most recently from 42375c1 to b381132 Compare June 15, 2020 22:17
Base automatically changed from remove-markdown to master June 16, 2020 20:20
@camilamaia camilamaia force-pushed the session branch 3 times, most recently from 7663634 to d5d8c11 Compare June 16, 2020 21:38
@camilamaia camilamaia force-pushed the session branch 6 times, most recently from edff481 to e1da6fd Compare June 18, 2020 23:00
@camilamaia camilamaia self-assigned this Jun 18, 2020
@camilamaia camilamaia marked this pull request as ready for review June 18, 2020 23:34
@@ -0,0 +1,19 @@
import curlify
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how this refactor follows the Single Responsibility Principle 😃

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean the entire class

Comment thread scanapi/reporter.py
env.globals["project_name"] = settings.get("project-name", "")
chosen_template = env.get_template(template_path)
return chosen_template.render(responses=responses)
def _build_context(self, results):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent refactor! It turned to be easier to read 🔍

Copy link
Copy Markdown
Contributor

@gillianomenezes gillianomenezes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good PR 👏

@camilamaia
Copy link
Copy Markdown
Member Author

@gillianomenezes thank you very much for the comments and feedbacks!!! 🎉

@camilamaia camilamaia merged commit 4e364d3 into master Jun 21, 2020
@camilamaia camilamaia deleted the session branch June 21, 2020 17:51
@camilamaia camilamaia mentioned this pull request Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show a tests summary in the HTML report Show the tests results in the html report

3 participants