Improve Testing Harness in GeckoView Tests for Changing GeckoRuntimeSettings for Runtime Level Tests
Categories
(GeckoView :: General, task)
Tracking
(Not tracked)
People
(Reporter: olivia, Unassigned)
References
Details
(Whiteboard: [fxdroid][group3])
For bug 1914655, we need a new runtime builder option here. The implementation ought to be thouroughly tested on the junit side. However, there doesn't seem to be an easy way to test this code path because the test runner has already specified runtime settings here and there isn't a way to customize it. I also looked into something like RuntimeCrashTestService and setting up a custom runtime like that for tests, but that didn't seem to do what we needed.
This bug is to add a way to customize runtime settings for junit tests.
Reporter | ||
Comment 1•9 months ago
•
|
||
I've started exploring this path by:
- Adjusting BaseSessionTest to take an optional of
geckoRuntimeSettings
- Passing that to GeckoSessionTestRule
- Changing RuntimeCreator getRuntime to move out the builder as a default and take specified settings.
Interestingly, this approach worked on the tests I wrote that used different runtime settings when ran indivdually, but did not when ran with other tests. I'll try to spend more time working on this approach, but documenting it here in case I find another way to test the patch in bug 1914655.
Edit: With more investigation it is because the GeckoRuntime stays the same between tests. So, this idea will work individually, but not when ran as a part of a suite. Looking for an option to reset the runtime between tests.
Best lead I have right now is, this comment seems like I might be able to bind it to the individual test, so I can close the runtime without closing the test.
Reporter | ||
Updated•9 months ago
|
Reporter | ||
Comment 2•9 months ago
|
||
Soft block on bug 1914655. There might be another way to test, but right now it looks like this bug is needed for a junit test.
Reporter | ||
Updated•9 months ago
|
Updated•9 months ago
|
Reporter | ||
Updated•8 months ago
|
Reporter | ||
Updated•8 months ago
|
Updated•8 months ago
|
Description
•