Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 05 21:46
    sormuras commented on 33e28c1
  • Dec 05 20:12
    Kazhuru commented #1596
  • Dec 05 20:08
    Kazhuru commented #1596
  • Dec 05 20:08
    Kazhuru commented #1596
  • Dec 05 20:04

    juliette-derancourt on gh-pages

    Add Paris JUG event (compare)

  • Dec 05 20:01
    juliette-derancourt commented on 33e28c1
  • Dec 05 19:38
    juliette-derancourt commented #1596
  • Dec 05 18:26
    Kazhuru commented #1596
  • Dec 05 18:25
    Kazhuru commented #1596
  • Dec 05 18:10
    Kazhuru commented #1596
  • Dec 05 18:09
    Kazhuru commented #1596
  • Dec 05 18:09
    Kazhuru commented #1596
  • Dec 05 17:20
    sbrannen edited #2082
  • Dec 05 17:19
    sbrannen edited #2082
  • Dec 05 17:19
    sbrannen edited #2082
  • Dec 05 17:19
    sbrannen edited #2103
  • Dec 05 17:18
    sbrannen edited #2078
  • Dec 05 17:18
    sbrannen edited #2078
  • Dec 05 17:17
    sbrannen unlabeled #1864
  • Dec 05 17:16
    sbrannen unlabeled #1978
Andrey K
@Legionivo
user is provided by @MethodSource
Trần Tiến Đức
@trantienduchn
I’m looking for a way to parameterized a list of MyComplexObject. Normally, in our test code, the MyComplexObject is provided by junit5 extensions. But this is the first time I need to test different MyComplexObject provided by different extension for a same scenario. Do you have any idea?
jahluwalia
@jahluwalia
hi everyone, if i run gradle test from a bash script in a loop, it seems to be exiting if gradle test fails
jahluwalia
@jahluwalia
apologies, that was just a bash scripting error.
I do have another question, is there a way to have the parameter values in teh xml results? or perhaps add them to the displayname using a DisplayNameGenerator?
gary
@garyglitter_gitlab
hello guys, I am facing error while running junit in cmd(windowd)
java -classpath D:\PPM\JARS\Jar\junit-4.10.jar;D:\PPM\JARS\Jar\hamcrest-all-1.3.jar org.junit.runner.JUnitCore CarsT
Karl Heinz Marbaise
@khmarbaise
Hi, currently I'm writing a JUnit Jupiter Extensions which works so far. But now I stumbled over an issue. I'm trying to intercept the calls to a method which is annotated with @BeforeEach in a test class. I'm already using a beforeTestExecution (Interface BeforeTestExecutionCallback) method implementation which is called as I wish and a beforeEach via Interface BeforeEachCallback. I can see that the method which is annotated with BeforeEach is being executed but I don't get the information in my extension that this method is being called. I also tried to get it intercepted via InvocationInterceptor...Maybe I misunderstand a thing ..
In the docs of BeforeEachCallback there is stated the following:
BeforeEachCallback defines the API for Extensions that wish to provide additional behavior to tests before each test is invoked. In this context, the term test refers to the actual test method plus any user defined setup methods (e.g., @BeforeEach methods). Concrete implementations often implement AfterEachCallback as well. which would I interpret that I should see the BeforeEach annotated method in my extension to be executed...I have created a simple test project which shows the issue (maybe?) ... https://github.com/khmarbaise/maven-jupiter-extension-issue
Trần Tiến Đức
@trantienduchn
@khmarbaise are you using @ExtendWith or @RegisterExtension ? Declaring a field annotated with @RegisterExtension might help you
Christian Stein
@sormuras
@khmarbaise @BeforeEach and BeforeEachCallback are two ways to declare additional methods, that are invoked before each test. You can't intercept calls with one of them.
See this diagram, table and text for details for details: https://junit.org/junit5/docs/current/user-guide/#extensions-execution-order
Ogion
@osyanin
Hello!
testCompile group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.5.2'
can't be downloaded. Something went wrong with mvnrepo ?
Christian Stein
@sormuras
Maybe. Project? Log? Environment?
Ogion
@osyanin
it really war a temporary down
Christian Stein
@sormuras
Glad to hear. Happy testing! :heavy_check_mark:
Ogion
@osyanin
thx ^_^
Andrey K
@Legionivo
hello. how can I get a value of argument passed from @MethodSource in @ParameterizedTest? I'm writing an extension which is going to disable tests depending on argument passed to test.
Christian Stein
@sormuras
It's not possible as of today. See junit-team/junit5#1139 for details.
With such an extension point being available, an extension might throw at least TestAbortedException: https://ota4j-team.github.io/opentest4j/docs/1.2.0/api/org/opentest4j/TestAbortedException.html
Andrey K
@Legionivo
Thank you very much @sormuras
Benjamin Muskalla
@bmuskalla
Working on an extension that needs to close a resource after the test. Currently I store the resource in the Store of the context. Everything works fine so far; I was just wondering why my resource must implement CloseableResource to be properly closed as it already is an AutoClosable. Now I need to wrap the AC into a CR to accomplish the same which feels kind of odd. Pretty sure there is a reason for it, just trying to wrap my head around it. Thanks for any pointers!
Christian Stein
@sormuras
Didn't want break existing code, when we introduced CloseableResource. AC and CR are compatible: just implement both. No need to wrap one in another.
Benjamin Muskalla
@bmuskalla
I can't implement both as the AC that I get us by another library that should not depend on junit. I wonder if the store implementation should close CRs as well as ACs if it finds any
(happy to contribute if that makes sense)
Christian Stein
@sormuras
I'll take it our today's team call. Let's see, if I find the related (closed?) issue.
Benjamin Muskalla
@bmuskalla
Ok, thanks! Just give me a ping and I'll open the feature request and PR for it if you guys agree
Christian Stein
@sormuras
Doc request: junit-team/junit5#1555
Original issue: junit-team/junit5#742
@bmuskalla Please add your use-case to #1555, that way we don't lose it.
Vincent Massol
@vmassol
Hi Guys. I'm upgrading to maven surefire/failsafe 3.0.0M4 in order to get the rerunFailingTestsCount feature for JUnit5. I'm testing it and I've noticed that my test's @AfterAll is not executed between retries (but @BeforeAll is). Any idea? Is that a bug?
vipul kumar
@me_vipul_gitlab
Hi, I am trying to upgrade the spring boot project from junit 4 to 5. After upgrading I can see there are no test running.
I would appreciate any help.
Jonathan Bluett-Duncan
@jbduncan
@me_vipul_gitlab It's hard to know what your problem is without a minimal example, but are you using Gradle by any chance, and if so does your build.gradle contain all the mandatory lines from https://github.com/junit-team/junit5-samples/blob/r5.4.0/junit5-jupiter-starter-gradle/build.gradle? :)
Christian Stein
@sormuras
@vmassol ... smells like a bug. Please open a ticket here: https://issues.apache.org/jira/projects/SUREFIRE
Vincent Massol
@vmassol
@sormuras thanks, will do, once I can log in again (seems they changed creds and I need to find out how to get my LDAP creds now ;))
Vincent Massol
@vmassol
@sormuras I've now reported https://issues.apache.org/jira/browse/SUREFIRE-1726. Note that the @AfterAll I mentioned are not in the test class itself but in an Extension used by the test class.
Christian Stein
@sormuras
Good to know. (...) Do you mean a method annotated with @AfterAll in an extension or an implementation of an AfterAllCallback? https://junit.org/junit5/docs/current/user-guide/#extensions-lifecycle-callbacks
Vincent Massol
@vmassol
@sormuras I meant "an implementation of an AfterAllCallback". I'll be more specific. I'm trying to create a small test case right now
Christian Stein
@sormuras
:+1:
Vincent Massol
@vmassol
interesting.... I tested with surefire plugin (not failsafe) and the smallest possible test and ... it worked... now need to debug why it doesn't with my real world code...
ok so not a problem of failsafe vs surefire since it works on my scaled down example with failsafe too.... continuing...
Christian Stein
@sormuras
Happy hunting! ;-)
Vincent Massol
@vmassol
thanks... I was pretty sure of myself since I had put a breakpoint in AfterAll.... ;)
(and it wasn't called)
we'll see, retesting....
nightswimmings
@nightswimmings
Hi mates!
JUnit finally looks like the framework we all needed, but there is one thing that it really bothers me. Getting rid of hamcrest coupling is something we have been awaiting for years, but now we got a Jupiter Assertions class, so we go back to non-dstandarized assertions. Did Junit5 team talked with AssertJ one about the possibility of merging all functionality in any of both sides? I mean, I think we all would love either removing Assertions from Junit and add them to AssertJ or either merge AssertJ into Junit Assertions class
Karl Heinz Marbaise
@khmarbaise
Hi, I'm not part of the JUnit team but merging for example AssertJ into JUnit Jupiter would not make sense cause those things are two different things so you can decide what to use cause it's a matter of taste what you prefer AssertJ/Hamcrest/truth/Spock/or just use JUnit Jupiter only etc. One word about merge would be a little problematic cause both projects have different licenses ...so not that easy...So the part for Assertions was based on the compatibility to JUnit4 (my assumption not sure about this maybe one of the Jupiter team can tell more about this)...
nightswimmings
@nightswimmings
I understand that rational, but if you want to externalize the provider, then provide an interface (if it is really needed in this case), and don't provide implementation to respect single responsability principle
Christian Stein
@sormuras
David Kornel
@kornys
Hello, I've tried to switch maven-surefire-plugin to 3.0.0-M4 and junit to 5.5.2, and seems if exception in BeforeAll or beforeAllCallback is thrown, surefire skip tests but report success
David Kornel
@kornys