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.
Bug 1585046 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
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](https://bugzilla.mozilla.org/show_bug.cgi?id=1590035)