-
Notifications
You must be signed in to change notification settings - Fork 7
Organization and improvements of test runners #590
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
Comments
Ad 1: I'm not sure. If I'm not wrong, the versions of the Playwright npm package and Docker image must match. That means any update to the npm package would require rebuilding the development Docker container. Are we ready for that? Ad 2: According to Ad 3: Before getting to this proposal, I commented on the PR #588 mentioned here. I don't think running visual tests along with other tests, i.e. during Ad 4: Since 2) is already in place, let's do it, why not. |
New things that raised:
|
I agree with the points mentioned in the first comment #590 (comment) . Regarding Playwright tests, I support running them every time, as we are primarily working with a component library where the visual aspect is crucial. Since Playwright tests will be the main testing mechanism for components, I see no reason to skip them. I also think that merging the Docker containers for node_shell and Playwright is a good idea. It would simplify the setup and reduce overhead while still keeping the necessary dependencies in place. |
OK, I still find it a little bit unstraightforward, but I see what you mean. Let's try it!
I think this is the very key point of the whole debate. I did not realize we are dropping Jest and after #588, Playwright is not the main testing mechanism, it's the only testing mechanism. I still expect the tests to be time consuming though, so it might make sense to skip them for 100%-safe edits like MD files (yes, there is no doubt that almost any change in the repository can break
Apparently, things may have changed since the time we implemented Playwright in Spirit. Let's do it as recommended. |
@mbohal, please read through this and provide your statement. We can discuss this next Monday. |
I'm afraid, that we might need/want to move to a newer version of Node.js sooner then the Playwright Docker image. I see no relationship between Node.js in Playwright and Node,js we use for our stack. We could even run playwright tests with python (https://mcr.microsoft.com/en-us/artifact/mar/playwright/python/about) and have no Node.js available at all. I think about Node.js being available in the Node.js image as a convenient accident and I would prefer not to depend on it for development. I recognize it would make life easier, but I don't think it will be worth it in the long run.
I agree with @lukasbriza, unless:
This would be the best I think. Detect if all changes happened in |
Few weak ago on team meeting, we decided not to merge Playwright and Node images as we do not want to relate on Microsoft's decision on which version to use. We are keeping those separated. By this, all points have been discussed with no output, so I am closing this. |
Based on #588, I am opening discussion about organization and improvements of test runners.
After #588 is merged, we will be in situation when we have
npm test
command that just runsnpm run test:jest
, but notnpm run test:playwright:all
. You need to runnpm run test:playwright:all
separately in Playwright Docker container to have uniform testing environment to generate correct snapshots.What more, if running tests on Apple Silicon, you always need to run
npm ci
within Docker (in Node shell or Playwright, it does not matter) to ensure compilation of rollup/vite for correct architecture.My suggestions:
(optional)
statements would disappear from the documentation.npm run test:playwright:all
withnpm test
npm ci
,npm test
(and all Playwright related scripts) to ensure that it is run inside Docker only, otherwise it fail with error.This would result in uniform environment, uniform approach that would be controlled (and would failed if running on host machine), less requimenets for disk space and more straightforward organization of npm scripts.
I would also suggest prefixing all linters with
lint:
, so that all linters are grouped, all test runners are grouped.cc @adamkudrna @mbohal @atmelmicro @lukasbriza
The text was updated successfully, but these errors were encountered: