junit-runner

org.openqa.selenium.remote.service.DriverService$Builder.createArgs()Lcom/google/common/collect/ImmutableList; with Selenium 3.5.3 Chrome 76

随声附和 提交于 2020-01-28 10:56:32
问题 I'm writing Selenium Junit tests with IntelliJ. The tests run ok if I trigger from test directly. However, if I trigger tests from TestRunnerSuite with JunitCore, I encountered following weird error that I did not find a solution after researching on google. Similar questions on DriverService$builder, but not my error type. [main] ERROR sire.responseOrg.TestIncidents - java.lang.AbstractMethodError: org.openqa.selenium.remote.service.DriverService$Builder.createArgs()Lcom/google/common

How to use scalacheck prop generators in scalatest FlatSpec

风流意气都作罢 提交于 2020-01-04 16:58:10
问题 I'm trying to use the scalacheck property generators in a scalatest.FlatSpec test file. The test should fail and be reported by junit framework (and eclipse in my case) but the test pass and error is just displayed in console. import scala.collection.immutable.TreeSet import org.junit.runner.RunWith import org.raisercostin.namek.UnitSpec import org.scalatest.junit.JUnitRunner import org.scalatest.FlatSpec import org.scalatest._ @RunWith(classOf[JUnitRunner]) class SetsTest2 extends FlatSpec

How to use scalacheck prop generators in scalatest FlatSpec

烂漫一生 提交于 2020-01-04 16:57:05
问题 I'm trying to use the scalacheck property generators in a scalatest.FlatSpec test file. The test should fail and be reported by junit framework (and eclipse in my case) but the test pass and error is just displayed in console. import scala.collection.immutable.TreeSet import org.junit.runner.RunWith import org.raisercostin.namek.UnitSpec import org.scalatest.junit.JUnitRunner import org.scalatest.FlatSpec import org.scalatest._ @RunWith(classOf[JUnitRunner]) class SetsTest2 extends FlatSpec

how to generate html report if my Junit is not run by Ant but by JunitCore.run

爱⌒轻易说出口 提交于 2020-01-01 07:11:05
问题 I worked on a project in which testclasses are run via JunitCore.run(testClasses) not via Ant because I have to run the project even with no ANT framework (so no Testng for the same reason). But I still need to create html and xml reports same as JUNIT/ANT. How to generate them in my case? Right now I found https://github.com/barrypitman/JUnitXmlFormatter/blob/master/src/main/java/barrypitman/junitXmlFormatter/AntXmlRunListener.java may be used to generate xml report. How do I generate html

how to combine @RunWith with @RunWith(Parameterized.class)

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-29 06:18:15
问题 I implemented a runner class A.class inherited from BlockJUnit4ClassRunner so that I can annotate tests with @RunWith(A.class). At the same time, sb. else annotate the tests with RunWith(Parameterized.class). It is obvious we cannot use two @RunWith at the same time. How to solve this problem? or how to merge these two @RunWith? 回答1: I believe this does what you want: package so.junit.runner; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized;

how to combine @RunWith with @RunWith(Parameterized.class)

北城以北 提交于 2019-12-29 06:17:20
问题 I implemented a runner class A.class inherited from BlockJUnit4ClassRunner so that I can annotate tests with @RunWith(A.class). At the same time, sb. else annotate the tests with RunWith(Parameterized.class). It is obvious we cannot use two @RunWith at the same time. How to solve this problem? or how to merge these two @RunWith? 回答1: I believe this does what you want: package so.junit.runner; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized;

How to parameterize junit Test Suite

∥☆過路亽.° 提交于 2019-12-19 09:43:19
问题 Is it possible to parameterize a TestSuite in junit 4 ? For declaring a class as a test suite I need the annotation @RunWith(Suite.class) , but the same annotation is also needed to declare the test as parameterized: @RunWith(Parameterized.class) so I cannot add both to the same class. I found a similar question in this site that did not help much. So far, all the examples I have found explain how to parameterize simple unit tests, not a complete test tuite. 回答1: I believe the basic answer is

How to run scenarios in Cucumber-JVM in parallel? [duplicate]

本秂侑毒 提交于 2019-12-12 12:08:41
问题 This question already has answers here : How to execute cucumber feature file parallel (4 answers) Closed 2 years ago . I have a set of acceptance tests written for the Cucumber-JVM. In order to reduce the feedback time I would like to run the scenarios (of a feature) in parallel. How do I do that in the simplest and most convenient way? (I would prefer to be able to express this in Java code, as a regular JUnit test/runner, i.e. I would prefer not to resort to some workaround using the maven