webdriverio cannot run/debug single script in one spec file - webdriver-io

like say there are three scripts(A, B, C) in spec file(D.spec.ts), currently i cannot run/debug single script(B) in IntelliJ IDEA, i just can run/debug in describe, that means it will run/debug all scripts(A, B, C), is there anyone can help on this?

Related

Intellij Module Dependency Export Option

In Intellij, you can add module dependency under Project Structure.
There is a checkbox under Export under Dependency tab. As shown below.
I try to select the checkbox for log4j dependency and recompile it. Nothing added in the output path. As shown below.
Can anyone tell me what is the use of the checkbox under Export? What is the expected behavior with this checkbox selected?
Remark:
In the official document, it said
The Export option lets you control the compilation classpath for the modules that depend on this one: the marked items will be included in the compilation classpath of the dependent module.
But I don't understand what is that mean. Thanks a lot.
Sometimes, you need to urge leaking dependencies in dependent modules. For example, you have module C, which is dependency of B, and if B provides some API methods you want to expose, for example, B is library, you probably use some structures from module C and without "export" checked when someone in module A, for example will use your API, there are issues with access to these structures, because these classes will not be added to compile classpath of module A.
A --- using this API requires C in compile classpath
|
B --- API uses these structures
C - data structures (should be exported when enumerated in B)
And sometimes you don't want leaking dependencies into compile classpath, so you need uncheck this option
If you don't know what does it mean compile classpath, read this: https://dzone.com/articles/runtime-classpath-vs-compile

Refactor the name of a Cucumber step definition in multiple .feature files in IntelliJ

Suppose a Cucumber step definition for which I would like to change the name on multiple .feature files.
#Then("^the step which I need to rename in multiple .feature files:$")
I was wondering if there was some IntelliJ plugin support to allow such refactoring.
If you right-click on the step in .feature file there is an option for that: Refactor -> Rename.... But it doesn't work as expected =)
Here is an issue for this: https://youtrack.jetbrains.com/issue/IDEA-152772
Best thing you can do so far is to upvote it...

IntelliJ IDEA: Exclude packages while running code coverage

Is there anyway we can exclude specific packages while running code coverage using IntelliJ IDEA as coverage runner?
There is an option under Run/Debug Configurations > Coverage, that allows us to include classes/packages, but it would be very tedious to include about a few hundred packages to exclude just a few.
There is probably no a way to match the packages that you want to include with a few wildcards? If you want to exclude one package from five packages (a, b, c, d, and e), this is the only option that I have found so far (in the "Run/Debug Configurations" dialog):
com.stackoverflow.a.*
com.stackoverflow.b.*
com.stackoverflow.d.*
com.stackoverflow.e.*
This is rather clumsy indeed.
When I run with code coverage (with a different configuration), the following output is shown:
D:\Programs\Java\jdk1.8.0_72\bin\java [...]
---- IntelliJ IDEA coverage runner ----
sampling ...
include patterns:
com\.stackoverflow\.q35257485\..*
com\.stackoverflow\.q34245660\.AnimatedBoxman(\$.*)*
exclude patterns:
Process finished with exit code 0
The "exclude patterns:" line gives the impression that it should be possible to exclude packages and/or classes, but I see no way to do this (in the "Run/Debug Configurations" dialog).

IntelliJ: generate a JAR but do *NOT* including dependencies

In a simple IntelliJ module, I just want to generate a .jar file with my .class files, via IntelliJ IDE commands.
Please be careful before marking this as a "duplicate":
Although I've seen Google and Stack hits with promising titles, I'm not finding a really good answer, or the title is misleading, or its an unanswered question. I cover one possible answer that I've seen before (below), and why I don't think it's a match.
I've used Eclipse in the past, but I'm rather new to IntelliJ.
I've worked with the "Project Structure / Artifacts" stuff. I can generate the giant jar, similar to using "shade", but it's huge because it includes all the nested dependencies. We want the small jar with just this module's class files because the system we're deploying to already has all the other jars in place.
I've seen some references to changing a target directory in the Artifacts dialog box, but it then talks about references being made in the Manifest file, which I don't want. The destination environment already has its java paths setup, so I'm worried that having jar references in this jar will mess that up. If this really is the answer then I'm confused about how it works.
Constraint 1: Can't use command line tools, since I'm actually walking somebody else through these steps, who likely doesn't have command line tools installed in the path, or wouldn't know how to use them, etc. They're not a coder. (Yes, I know this sounds like an odd scenario; I inherited this situation.)
Constraint 2: We want to keep this as a simple IntelliJ project, vs. converting to Maven or Ant or Gradle, etc.
Coworker had the fix.
Short Answer:
Remove all of the other jars/libraries from Output Layout tab of the Artifacts config dialog.
Longer Answer:
You still do File / Project Structure...
Then in the Project Settings, click Artifacts.
And then you still click the plus button (second column) ti create a new artifact setting.
The trick is the "Output Layout" tab in the third column of the window. Highlight all entries EXCEPT the compiled output of your project and delete all those other entries (click the minus button under that tab, directly above your_project.jar)
On my laptop this causes it to pause for a few seconds; I thought it didn't do anything, then finally it reflected that everything was gone except "'my_module' compile output"
Also check the "Build on make" (for when you later do Build / Rebuild Project)
If you need both a full jar and a slim jar, you can have more than one Artifact configuration with different names, and they will default to different output directories.

Compiling and deploying assemblies that are used as references for other projects

Okay so here is my situation:
Project A is in solution A, lets call it's output a.dll.
Project B is in solution B, lets call it's output b.exe.
Project B references a.dll
Both solutions are under source code control in different repositories.
My question is: how can i assure that Project A's output gets redirected to project B's "External references" folder, overriding the previous version of a.dll, regardless of what the local developers path structure looks like, is there a way to do this? alternatively could solution A, invoke the build of solution B and then copy it's output locally?
To be brief, automating builds accross solutions without a 'common directory structure' is possible through the use of:
commandline parameters
environment variables
I would encourage you however to consider the "Convention over Configuration" mantra and think up a convention about the relative positions of solutions A and B.
Furthermore it's possible to build projects and solutions using the MSBuild task. The binaries can be copied to your "External references" folder using the Copy task.