This repository has been archived by the owner on Jan 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for running a test fixture + test + simplified the setup + re…
…adme
- Loading branch information
Showing
13 changed files
with
123 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,35 @@ | ||
# webstorm-testcafe | ||
Plugin for webstorm to integrate with TestCafe | ||
# TestCafe runner for Webstorm | ||
|
||
Integration with[TestCafe](https://devexpress.github.io/testcafe/) TestCafe A node.js tool to automate end-to-end web testing. | ||
This plugin allows you to run TestCafe tests directly from Webstorm. | ||
|
||
* Run a particular test, fixture, all tests in a file or directory via the context menu | ||
* View test results in the 'Run Console' | ||
|
||
![Demo](./images/demo.gif) | ||
|
||
## Requirements | ||
|
||
TestCafe should be installed in your project as a local package. To install it, use the npm install testcafe command or add TestCafe to dependencies in your package.json file. Your project should contain TestCafe modules in node_modules\testcafe\.... | ||
|
||
### Running a specific test | ||
|
||
To run a specific test, invoke the context menu when the cursor is placed on the test name. | ||
|
||
![Target] (./images/specific.png) | ||
|
||
### Running all tests in a fixture | ||
|
||
To run all tests in a test fixture, invoke the context menu when the cursor is placed on the fixture name. | ||
|
||
![Target] (./images/fixture.png) | ||
|
||
### Running all tests in a file | ||
|
||
To run all tests in the current file, invoke the context menu for this file. | ||
|
||
### Running all tests in a folder | ||
|
||
To run all test files in a folder, invoke the context menu for this folder. | ||
|
||
![Target] (./images/alltests.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions
7
src/main/java/org/lilbaek/webstorm/testcafe/run/TestCafeCurrentSetup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.lilbaek.webstorm.testcafe.run; | ||
|
||
public class TestCafeCurrentSetup { | ||
public static String Folder; | ||
public static String TestName; | ||
public static String FixtureName; | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/org/lilbaek/webstorm/testcafe/run/TestCafeGeneralCommandLine.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.lilbaek.webstorm.testcafe.run; | ||
|
||
import com.intellij.execution.CommandLineUtil; | ||
import com.intellij.execution.Platform; | ||
import com.intellij.execution.configurations.GeneralCommandLine; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class TestCafeGeneralCommandLine extends GeneralCommandLine { | ||
|
||
@NotNull | ||
@Override | ||
protected List<String> prepareCommandLine(@NotNull String command, @NotNull List<String> parameters, @NotNull Platform platform) { | ||
return super.prepareCommandLine(command, parameters, platform); | ||
//Don't do all kinds of Windows magic woodo. Just accept what is send in | ||
/*List<String> commandLine = new ArrayList<>(parameters.size() + 1); | ||
commandLine.addAll(parameters); | ||
return commandLine;*/ | ||
} | ||
} |
4 changes: 0 additions & 4 deletions
4
src/main/java/org/lilbaek/webstorm/testcafe/run/TestCafeHelper.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters