How to run scala BDD tests in Eclipse IDE - eclipse

I'm trying to run this sample BDD test examples in my Eclipse IDE, but seems that in Run Configurations there are not suitable propositions for that? Also I couldn't find any suitable perspective for that.
What I'm supposed to do to run that test in my Eclipse IDE?
I'm aware that I can run a test (or set of tests) with the command line, but is there some integrated solutions in the Eclipse IDE?

This article explains how to run scalatest tests in eclipse.

Related

When I run engine.scala nothing happens

I'm using gatling and scala ans eclipse as an editor, when I click on Engine.scala to run it nothing happen, I dont know why ?
ScalaIDE (the Eclipse plugin for Scala) seems to be dead. You should either run from the command line with maven (mvn gatling:test) or switch to IntelliJ (that has great built-in support for Scala).

Not able to run Gatling from Eclipse

I downloaded sample Gatling maven project from here . I am able to run test from command-line but I also would like to run it from Eclipse.
I imported project to Eclipse as existing maven project and I installed Scala IDE. The documentation says: "Simply launch the Engine class in your IDE." And the question is how I can run that Engine class? Should I create new configuration to run it? Could anybody explain it please?

Running ApsctJ in Intellij IDEA with Scala

I am using Intellij IDEA Community Edition 14.0.3 for Scala development. I am having AspectJ in my application. I am using sbt-aspect v0.10.1.
I am able to run everything fine when I run the application from SBT console. However, when I use run from the intellij menu, it is not invoking the aspect.
Because of this, I am not able to run in Debug Mode. How can I make it work with intellij ?
I have the same issue.
My workaround is:
Open project Run/Debug configuration on IntelliJ IDEA
In the VM Options field type: -javaagent:path/to/aspectjweaver.jar
path/to/aspectjweaver.jar in my case is C:\Users\aelkin\.ivy2\cache\org.aspectj\aspectjweaver\jars\aspectjweaver-1.8.13.jar
Actually I do not use Scala in IntelliJ IDEA, but Java. Anyway, a quick web search led me to the SBT Community Plugins page which lists these links:
Plugins for IDEs
IntelliJ IDEA
sbt Plugin to generate IDEA project configuration: https://github.com/mpeltonen/sbt-idea
IDEA Plugin to embed an sbt Console into the IDE: https://github.com/orfjackal/idea-sbt-plugin
At the time of writing this GitHub is down for database maintenance, so I cannot check on the projects mentioned there, but in 15 minutes or you should be able to navigate there by yourself and see if the repos actually contain something useful for you.

Scala build process

First some context:
My aim is to use scala alongside a testing environment, preferably in an ide.
At first I installed scala (v. 2.10.1) and sbt and it worked. I used emacs and a shell.
Then I wanted to use eclipse and installed the sbt plugin. But when I tried the FlatSpec example of the scalatest website together with the scalatest lib, it did compile but 0/0 tests did run.
In intellij I tried the same example but although I gave my sdk location, the collection package wasn't found.
My problem:
I don't understand what I have to tell my ide or what I have to write (maybe files for maven or make etc.) or where I can learn all that.
My question:
What has the ide to know if I want to run a scala project?
- location of sdk, jdk, sbt, my_project, ...
- versions of scala, java etc.
What else must it know?
IntelliJ has build in support for sbt projects. My work flow is the following :
Create a project (in the shell) using sbt. Basically you have to create a build.sbt and the necessary directory structure
`src/main/scala`
`src/main/resources`
`src/test/`
The in IntelliJ just do Open -> select build.sbt.
Also check auto-import checkbox.
Everything should work after this.
NOTE: You may have to install the Scala and sbt plugin for the above to work.

Difference between `JUnit Plug-in Test` and `JUnit Test` in eclipse

In the eclipse run command, there are two choices: JUnit Plug-in Test and JUnit Test.
Before, I tried to launch eclipse plugin test (org.eclipse.jdt.ui.tests.refactoring), and I had some issues ( Debugging eclipse unit test code "Test class should have exactly one" and "Workspace is closed" error ).
The issue was that when I tried to launch the debugger with JUnit Test, I got Workspace is closed error.
In eclipse configuration, they have the same workspace.
What is the difference between the two? And especially, how does workspace work for them?
Why I have Workspace is closed error with JUnit Test run? Is it possible to launch eclipse plugin test with JUnit Test?
JUnit Plug-in test is for testing Eclipse plug-ins. It runs a new instance of Eclipse. Then, it runs the tests.
JUnit test is for testing regular Java applications. It runs the tests without launching a new instance of Eclipse.