How to get wdio running through IntelliJ run/debug configurations?

rozza

I can run the tests from the command line using

>  ./node_modules/.bin/wdio wdio.conf.js 

But if I try to run this from IntelliJ's run/debug configuration I get various different errors.

Featurefile or directory:      /path_to_my_feature_file/myfeature.feature
Cucumber.js arguments:    wdio.conf.js
Executable path:                 /path_to_my_project/node_modules/.bin/wdio

gives me

more than one config file specified



If I remove the Cucumber Arguments, it just runs indefinitely. If I stop it running I get the error

Failed loading configuration file

It looks like there's some kind of issue with loading the config file, but I don't know how to fix it. Any suggestions? wdio.conf.js exists and is in the project root.

lena

WebStorm doesn't provide any special support for wdio test runner. But you can still run/debug the tests using Node.js run configuration like the following:

enter image description here

But this doesn't work out of the box due to problems related to using non-tty environment (Node.js run console in IDEA is non-tty). As a workaround, please try commenting out if (process.stdin.isTTY) and else branch in node_modules\webdriverio\build\lib\cli.js:

//if (process.stdin.isTTY) {
    launch();
/*
} else {
   var stdinData = '';
    /!*
     * get a list of spec files to run from stdin, overriding any other
     * configuration suite or specs.
     *!/
    var stdin = process.openStdin();
    stdin.setEncoding('utf8');
    stdin.on('data', function (data) {
        stdinData += data;
    });
    stdin.on('end', function () {
        if (stdinData.length > 0) {
            args['specs'] = stdinData.trim().split(/\r?\n/);
        }
        launch();
    });
}*/

see WEB-31745

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to get console output(in code) after running configurations in eclipse?

How to migrate tomcat configurations in Eclipse to Intellij Idea?

How to get the command line arguments running java in IntelliJ IDEA 14.1

How does virtualbox get the network configurations?

How to accommodate classpath user entries from Eclipse to IntelliJ in run configurations

How to share (VCS) run configurations templates with IntelliJ IDEA

How do I share IntelliJ Run/Debug configurations between projects?

Java Play - How run Play in IntelliJ with custom sbt configurations options

IntelliJ Java Configurations

How to inject different ObjectMappers having different configurations through Autowired?

Running configurations with a limit

Intellij Run Configurations as root on linux

Maven run/debug configurations in Intellij

tomcat run configurations in intellij IDEA

Error when running Java file through Intellij terminal

How can I get a list of all configurations for a Gradle project?

How to get the configurations from within a module import in NestJS?

How to get database configurations using data source object in java

How to get the configurations dict from a pre-configured logging object

Running multiple launch configurations at once

How do I get a server up and running in a virtual machine through only command line?

Powershell how to get a list of running processes and run them through the MD5 algorithm

How can I get the Average Running Speed of the app user through HealthKit?

How to run multiple IntelliJ IDEA configurations after one another (serially, sequentially)?

In IntelliJ, how do I set default environment variables for new test configurations?

How configure Azure function project in Intellij/Pycharm run/debug configurations on mac

How to run Java program through the terminal in IntelliJ

How to get the process that is running

How to debug an application running in Docker with IntelliJ?