You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently each test created by hack/generate-e2e-test.py as found in #109 defines coreCodeTemplate as a String. That String is a copy of the contents of SomeExample.rpde + "\n\nsaveFrame(\"%s\")\nexit()\n".
If tests are going to live in the same repo as examples, then this is code duplication, which hurts maintainability.
In the future, tests extending E2eTestBase should not contain a copy of example code. Instead each test should include a Java statement that dynamically loads a specific .rpde example filename into a String, then appends saveFrame() and exit() to that string.
Loading at test time will prevent tests and examples from getting out of sync during testing if the example is being edited but the test isn't regenerated (so the coreCodeTemplate String is out-of-date).
The text was updated successfully, but these errors were encountered:
Yeah, that is the first idea when I tried to implement the test cases generation. But it is a little complex because of the path problem: They have different paths in different envs.
We need to use relative path and set the root path of the repo as the base path.
Currently each test created by hack/generate-e2e-test.py as found in #109 defines
coreCodeTemplate
as a String. That String is a copy of the contents of SomeExample.rpde +"\n\nsaveFrame(\"%s\")\nexit()\n"
.If tests are going to live in the same repo as examples, then this is code duplication, which hurts maintainability.
In the future, tests extending
E2eTestBase
should not contain a copy of example code. Instead each test should include a Java statement that dynamically loads a specific .rpde example filename into a String, then appendssaveFrame()
andexit()
to that string.Loading at test time will prevent tests and examples from getting out of sync during testing if the example is being edited but the test isn't regenerated (so the coreCodeTemplate String is out-of-date).
The text was updated successfully, but these errors were encountered: