I would like to run/debug TestCafe tests using WebStorm. Does anyone have
a suggested configuration I need to do this?
WebStorm doesn't provide any special support for TestCafe (if you miss it, please vote for WEB-30315); but you can use VS Code instructions to run/debug in WebStorm. Namely, you need Node.js Run configuration like the following:
where JavaScript file: is set to a path to your locally installed testcafe module, e.g. node_modules\testcafe\bin\testcafe.js, and Application parameters: are testcafe cli args, like chrome myTestFile.js
Related
We're developing a design system with Stencil. We are now writing e2e tests as described in Stencil docs.
There is shared VS Code config which allows to run the tests with Visual Studio Code, but we're using JetBrains IDEs (IntelliJ IDEA and WebStorm) and it is not obvious how to set up tests to run them with IDE interface.
Did anyone managed to set up them in JetBrains IDEs?
You can try using the Node.js run configuration with similar setup: specify the project root folder as a Working directory, path/to/node_modules/.bin/stencil as JavaScript file, add test --e2e $FilePath$ to Application parameters
I have Create React App applications that I test with Jest. I've been using VSCode, but am now switching to IntelliJ. I'm wanting to duplicate the test run/debug behavior that I get in VSCode.
In VSCode, whenever I run or debug, in VSCode, a prompt comes up in the terminal asking which file, test, etc, that I would like to run. See first photo below. As of right now, I can run the tests in IntelliJ, but it doesn't ask me which tests I want to run.
Also, in IntelliJ, if I run a test file by itself, or a single test by itself, it seems to make a new configuration automatically, which I don't like.
I'd like to have just a single configuration for Jest and have any/all tests default to that configuration if possible.
Behavior in VSCode, that I'd like in inteliiJ
I've just followed the CodeceptJS Quickstart and opened first_test.js in the PhpStorm IDE (equivalent to WebStorm, IntelliJ, etc.).
For all the built-in functions, I'm getting "Unresolved function or method …":
I also don't get any autocompletion on I.
I've tried the following.
Looked for a CodeceptJS plugin. Didn't find any.
Enabled codeceptjs/node_modules in Settings -> Languages & Frameworks -> JavaScript -> Libraries.
Set JavaScript language version to ECMAScript 6.
Enabled the Node.js Core library.
Restarted PhpStorm.
Please run 'npm install codeceptjs'.
I had to follow the steps outlined in https://codecept.io/typescript/ to fully enable CodeceptJS in PHPStorm.
Steps
npm install codeceptjs typescript ts-node
Add require('ts-node/register') as first line in my codecept.conf.js file
Create a tsconfig.json in my project root folder
Run npx codeceptjs def to create the default steps.d.ts file
After that, autocompletion worked in my tests :)
I did a patch in the HtmlUnitDriver.java file, as explained here:
Is it possible to ignore JavaScript exceptions when working with WebDriver (HtmlUnit, Ruby bindings)
I've followed the explanations on the selenium build wiki and in the readme, also the tip given here:
Building the Selenium Server Project
Still, I don't have a jar file like selenium-server-standalone-2.25.0.jar which can be run and used as a headless browser for selenium tests.
... So I'm trying to recreate the selenium-server-standalone-2.xx.jar file with my patch, and use it to run my headless tests.
Can anyone explain to me how to do this? Thanks!
The best way I found is to do:
go //java/server/src/org/openqa/selenium/remote/server:server:uber //java/client/src/org/openqa/selenium:client-combined:uber
This will create a single jar for the selenium server
Then run go release.
The resulting .jar should be found in build\dist folder of the selenium source folder. (ex. ./build/java/server/src/org/openqa/grid/selenium/selenium-standalone.jar)
See also https://github.com/SeleniumHQ/selenium/wiki/Building-WebDriver#tips.
Here is a step by step building guide for selenium standalone server. The build process of selenium projects may be not so strait forward to newbies, so I recommend this detailed guide on how to create a runnable standalone jar.
http://shengwangi.blogspot.com/2014/08/how-to-build-selenium-from-source.html
Also you can refer to the official document on build selenium.
https://code.google.com/p/selenium/wiki/BuildingWebDriver#Building_Selenium_Server
I would like to run PHPUnit tests on the development server as opposed to my desktop.
Using PHPStorm Run debug configuration I have created new PHPUnit on Server configuration.
However when I try to run it, PHPStorm does not seem to be able to see the XML configuration file. The path to the XML configuration file is on the local desktop, so it makes sense that PHPStorm runner would not be able to find the file on the server. However PHPStorm does not allow me to supply the path on the server.
P.S. I was able to run tests manually on the server and on my local desktop. In this question I am trying to figure out how to run the tests on the server directly from PHPStorm.
P.P.S. Could this be a bug in PHPStorm? if yes, then I'll submit it.
So far this seems to be an issue in PHPStorm. I have filed the issue here: http://youtrack.jetbrains.net/issue/WI-9369