Gallio executing Error on Sonar - plugins

I have C# project. when I analyzed the project the gallio plugin is not executing. It says that,
Gallio won't execute as there are no test projects.
But i have test project. In my pom.xml file test pattern is
<visual.test.project.pattern>*.Tests;*.Test</visual.test.project.pattern>
why this happens?
I have Ncover 3 installed in my system. when i analyze the project with mvn sonar:sonar, I had sets properties as
-Dsonar.gallio.coverage.tool=NCover
-Dsonar.dotnet.test.assemblies="Assembly files"

Related

Run integration tests for cucumber with sbt src/it directory

I have an integration test with cucumber located in src/it directory
how can I run these tests because the JUnit test framework or any other cucumber-scala sbt plugin wants me to define all related stuff in src/test directory

Unresolved dependency issue for JUnit tests with Gradle project in VS Code's Java Test Runnner

I cannot run my JUnit tests, which are part of a Gradle-based Java project, in VS Code using the Java Test Runner. I get a dependency resolution error when I run test:
message: Unresolved dependency: org.junit:junit-bom:5.6.2; code: 0; resource: /Users/tdean-vital/Development/vitreaauthorization/build.gradle;
I do not get this error when I run from the Gradle command line - All tests run. I have run from a Mac using multiple versions of Gradle. I have also run in the gradle:4.1.1-jre-11 Docker image. All attempts succeed except running from within the VS Code Java Test Runner.
I have tried explicitly adding a dependency on org.junit:junit-bom:562 to my Gradle build projects, but that gave me the same error.
Any suggestions on how to identify and fix this issue so that I can run my tests from within VS Code?

Cannot "Run as JUnit Plug-in test" on test plugin/package (JUnit5)

I'm trying to add JUnit5 support in my Eclipse RCP application. It almost works, because for now I can:
Use Maven to build whole application and run tests with Tycho
Run single JUnit5 tests (creating run configuration on specific class) in
Eclipse
Run single JUnit5 tests in Run as JUnit Plug-in test mode in Eclipse
Run multiple JUnit5 tests in Run as JUnit test mode in Eclipse
What I'm trying to achieve now is to be able to run whole sets of test classes in plug-in test mode. For JUnit4-based plug-ins I could simply right-click on whole package or even whole plug-in and invoke Run As -> JUnit Plug-in test.
When I do the same operation on JUnit5 tests I get an error: No tests found with test runner 'JUnit 5'.
My current configuration for such plug-ins looks as follows:
According to official instructions in MANIFEST.FM I have Import-Package dependencies:
org.junit.jupiter.api,
org.junit.jupiter.params,
org.junit.jupiter.params.provider
and org.junit as Require-Bundle dependency
In order to run tests in Eclipse IDE I've also added JUnit 5 library to Java Build Path of the plugin. I coudn't add JUnit 5 runner dependencies to MANIFEST.FM instead, because of conflict with Tycho.

Eclipse NoClassDefFoundError when running Elasticsearch JUnit tests

I am trying to run some Unit Tests written for a Mavenized project in Eclipse. The tests run perfectly fine from the command line. They also run perfectly fine if I open up Eclipse and run the tests directly off the POM file (i.e. right click on pom.xml and say run maven tests or whatever).
However, I get the following error when I run the tests as JUnit tests in Eclipse:
java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.test.ESIntegTestCase
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:340)
at com.carrotsearch.randomizedtesting.RandomizedRunner$1.run(RandomizedRunner.java:562)
I am using Elasticsearch version 2.1.0. The elasticsearch-2.1.0-tests.jar that contains org.elasticsearch.test.ESIntegTestCase is listed as a dependency in pom.xml and all Maven Dependencies show up in my Eclipse project's build path. I even tried specifically adding the jar to my buildpath and to the run configuration's classpath in Eclipse. Both do not work. Cleaning my project via Project -> Clean... also does not work.

m2eclipse: Like "mvn test" but with GUI?

We have a multi-module Maven setup with a master pom.xml that includes all the others. So mvn test from the root directory runs all our unit tests, with textual output.
I can do Run / Run As / JUnit Test to run a single test class with a graphical test runner.
Question: How do I combine the two, so that I can run all the tests that mvn test runs but with a graphical runner, like the one from Run / Run As / JUnit Test?
Create an eclipse project with all your modules as Maven Dependecies and then create a JUnit Suite which incorporates all tests. Eclipse's JUnit Runner then will execute all declared Tests if you run this suite.
In Eclipse Juno, assuming your project is a Maven Project, you can just right click the project name in the Project Explorer and select Run As ... jUnit test. Alternatively you can produce the same text output you get from mvn test by selecting Run As ... Maven test