-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[System Tests] Increase System Tests Speed by Decreasing Coverage #9045
[System Tests] Increase System Tests Speed by Decreasing Coverage #9045
Conversation
This is how the tests were run on all three page types: plots2/test/system/comment_test.rb Lines 23 to 33 in f82a11c
Lines 43 to 50 in f82a11c
|
test/system/comment_test.rb
Outdated
|
||
# other comment tests can ALSO be tested on Wikis and Questions. | ||
# scroll past this block for those tests. | ||
{ :note => :comment_note }.each do |page_type, node_name| | ||
test "#{page_type_string}: addComment(comment_text)" do |
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.
This block just runs tests on research notes (most tests will now live in this block).
# check for comment text | ||
assert_selector("#{parent_id} .comment .comment-body p", text: 'no you can\'t') | ||
end | ||
|
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.
I deleted this test (which I wrote early on in the internship), because it doesn't seem so necessary now.
Codecov Report
@@ Coverage Diff @@
## main #9045 +/- ##
=======================================
Coverage ? 82.05%
=======================================
Files ? 100
Lines ? 5939
Branches ? 0
=======================================
Hits ? 4873
Misses ? 1066
Partials ? 0 |
# | ||
# the page_types are: Wikis, Research Notes, and Questions | ||
# defined in test/test_helper.rb | ||
page_types.each do |page_type, node_name| |
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.
In this block, tests are run on all three page types. Keeping the cross-wiring and image upload tests here for now, but perhaps they can be moved out soon.
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, 16m is pretty good. Are there other places we could obviously speed things up? For example, i wonder if caching dependencies would make a significant difference; i wasn't sure the Yarn deps were getting correctly cached...
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.
I'll definitely do another re-assessment after the internship is over... I think if the editor code is overhauled, maybe we really won't need to do so many cross-wiring tests?
I don't know much about caching dependencies, do you have a link to read up on that?
Code Climate has analyzed commit d95e62e and detected 0 issues on this pull request. View more on Code Climate. |
System tests passed in 16 minutes... My last two PRs had system tests passing in 25 minutes, but also 19 minutes. Seems like a slight improvement in speed! Ready to merge with review! |
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.
I think this looks great. I really appreciate that you're at a point where you can remove tests due to refactors or better understanding of the code. Nice!!
* reduce most test coverage to just notes * oops, added page_type_string * updated out-of-date selectors; moved tests around * change selector
* reduce most test coverage to just notes * oops, added page_type_string * updated out-of-date selectors; moved tests around * change selector
* reduce most test coverage to just notes * oops, added page_type_string * updated out-of-date selectors; moved tests around * change selector
* reduce most test coverage to just notes * oops, added page_type_string * updated out-of-date selectors; moved tests around * change selector
Currently, all the comment system tests are tested on the three main page types:
In the past, this may have been necessary because the Comment Editor did sometimes behave differently, particularly on wiki pages.
However, with recent refactoring of
editor.js
, which I explained in this comment, I think we can be confident that comments will behave pretty similarly across all three page types. After all, they all derive from thenotes/comments
partial.So I'm reducing test coverage and just running some system tests on only research notes, and other tests on all three (wikis, notes, and questions). This way, we can keep the multi-page testing block just in case we want to test on all 3 in the future.
(This issue is part of the larger Comment Editor Overhaul Project with Outreachy. Refer to Planning Issue #9069 for more context)