[meta] Expand the raptor-browsertime unit test coverage
Categories
(Testing :: Raptor, enhancement, P2)
Tracking
(Not tracked)
People
(Reporter: rwood, Assigned: onegru)
References
(Blocks 1 open bug)
Details
(Keywords: meta)
Add more raptor framework python unit tests. Note: Focus on the browsertime-raptor specific code path, since we may be moving to browsertime soon and eventually removing the raptor webext, control server etc.
Comment 1•5 years ago
|
||
Octavian can you take this one please
Assignee | ||
Comment 2•5 years ago
|
||
Yes, I will work on it after finishing work on Bug 1585966.
Assignee | ||
Comment 3•5 years ago
•
|
||
Unit testing can be placed in testing/raptor/test/test_raptor.py
file,
since both Raptor
and Browsertime
components reside in testing/raptor/raptor/raptor.py
file.
The unit testing of the Browsertime
component can be done with the following steps:
1. Adapt Browsertime
to already-written test-cases (add Browsertime
to @pytest.mark.parametrize
):
-test_build_profile
-test_start_browser
2. Write new test case for run_test
method.
Proposal
: write tests only for public Browsertime
methods. The methods in which Browsertime
have its inner logic, like
-remove_mozprofile_delimiters_from_profile
-check_for_crashes
-clean_up
-run_test_setup
-run_test_teardown
must not be tested, because they will make the test cases more brittle.
Note
: step 1 is already done and will be submitted along with step 2 in one single commit.
Edit
: this comment is outdated. The discussion related to raptor.py tested components will continue here
Comment 4•5 years ago
|
||
I see that Browsertime's integration is mostly spread across 3 main modules:
We should split this ticket in 3 subtasks, one for each module.
Updated•5 years ago
|
Comment 5•5 years ago
|
||
note:
keep in mind that output.py and results.py will be refactored in the future so maybe we should not spend to much time in these modules.
Assignee | ||
Comment 6•5 years ago
|
||
OK, I will try not to refactor, but to better shape the code for easy testing.
No breaking changes will be added.
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 7•5 years ago
|
||
Hey Octavian, are you finished with this bug or are you adding more unit tests? If you're finished please close, thanks!
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
Finished, resolved. Thanks for reminding :)
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Description
•