Closed alveshelio closed 1 year ago
Hi Helio, Have you been able to start your test from the command line? if yes, how does the command look like?
Hi @mbolotov,
Yes I'm able to run the testes from the command line like so: yarn playwright test --config ./playwright.config.ts
or npx playwright test --config ./playwright.config.ts
. If I want to run a specific file I do yarn playwright test --config ./playwright.config.ts -- My-File.spec
It might be something wrong with your yarn installation.
If you are okay to use npm
to run the tests, you can do this by selecting this package manager at the Runner
tab:
Also, could you try running those variations from the command line:
yarn run playwright test --config ./playwright.config.ts
/usr/bin/yarn playwright test --config ./playwright.config.ts
/usr/bin/yarn run playwright test --config ./playwright.config.ts
Do they run successfully?
When I indeed change the Package Manager to npm it works.
When I run yarn run playwright test --config .playwright/playwright.config.ts
this one works
When I run
/usr/bin/yarn playwright test --config ~/git/appia-web-ui/playwright/playwright.config.ts
or
/usr/bin/yarn run playwright test --config ~/git/appia-web-ui/playwright/playwright.config.ts
These fail with error:
CRITICAL:root:Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cliapp/app.py", line 182, in _run
self.settings.load_configs()
File "/usr/lib/python3/dist-packages/cliapp/settings.py", line 829, in load_configs
self._read_ini(pathname, f)
File "/usr/lib/python3/dist-packages/cliapp/settings.py", line 838, in _read_ini
cp.readfp(f)
File "/usr/lib/python3.8/configparser.py", line 763, in readfp
self.read_file(fp, source=filename)
File "/usr/lib/python3.8/configparser.py", line 718, in read_file
self._read(f, source)
File "/usr/lib/python3.8/configparser.py", line 1082, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.
file: '.../git/appia-web-ui/playwright/playwright.config.ts', line: 1
"import { PlaywrightTestConfig } from '@playwright/test';\n"
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/cliapp/app.py", line 182, in _run self.settings.load_configs() File "/usr/lib/python3/dist-packages/cliapp/settings.py", line 829, in load_configs self._read_ini(pathname, f) File "/usr/lib/python3/dist-packages/cliapp/settings.py", line 838, in _read_ini cp.readfp(f) File "/usr/lib/python3.8/configparser.py", line 763, in readfp self.read_file(fp, source=filename) File "/usr/lib/python3.8/configparser.py", line 718, in read_file self._read(f, source) File "/usr/lib/python3.8/configparser.py", line 1082, in _read raise MissingSectionHeaderError(fpname, lineno, line) configparser.MissingSectionHeaderError: File contains no section headers. file: '.../git/appia-web-ui/playwright/playwright.config.ts', line: 1 "import { PlaywrightTestConfig } from '@playwright/test';\n"
By the way, I've updated Maestro to the latest version and I'm still getting the same errors when using yarn
so I would say you have some problem with the installed yarn (the one that's located at /usr/bin/yarn
)
You have to fix it in order to start tests from IDE via yarn
I'm closing this ticket now. Please feel free to reopen it if you think there are any things that can be fixed or improved on the plugin side.
Hi,
I'm trying to run tests within Webstorm but I'm always getting errors.
I'm on Linux, Ubuntu 20, and I have WebStorm 2022.2.3 installed and I'm using Maestro 1.2
This is my config for this file:
And this is the result when I try to run the tests
Note: My
playwright
directory is in the same level assrc
.If I select
Headed
orDebug
then I getyarn: error: no such option: --headed
oryarn: error: no such option: --debug
I'm wondering what I am doing wrong.
Thank you