Run JUnit 5 Tests in a Jenkins Pipeline - JUnit 5 Test Automation - Part 2
Ғылым және технология
For this second video in the JUnit 5 Test Automation Series, I will walk you through how to write a Jenkins Pipeline script that uses the Console Launcher to execute our JUnit 5 test methods from the previous video on a Jenkins server. We'll also use the JUnit Jenkins plugin to display test results within Jenkins
GitHub Repo with Jenkins Pipeline Script: github.com/moss-n/junit-autom...
TOC:
Intro: 00:00 - 01:00
Pipeline Job creation: 01:01 - 03:45
Write the Pipeline Script: 03:46 - 17:49
Running the Pipeline Script: 17:50 - 20:29
JUnit Jenkins Plugin Reporting: 20:30 - 24:55
Conclusion: 24:56 - 25:47
Пікірлер: 14
TOC: Intro: 00:00 - 01:00 Pipeline Job creation: 01:01 - 03:45 Write the Pipeline Script: 03:46 - 17:49 Running the Pipeline Script: 17:50 - 20:29 JUnit Jenkins Plugin Reporting: 20:30 - 24:55 Conclusion: 24:56 - 25:47
Really great vids. I am going to crunch through all of yours. These are EXACTLY what I wanted! Starting with running at a command line and then adding the parts on top is totally the best way to work. You rock!
@tech_with_moss
3 жыл бұрын
That's awesome! Thank you I really appreciate it. Im glad you found these helpful!
@qwarlockz8017
3 жыл бұрын
@@tech_with_moss no prob. Thank you. By the by... Love the junit-platform-console-standalone... but do you know how you can get Mockito working in there? Everytime I try and use @ExtendedWith(MockitoExtension.class) the launcher can not find the any tests. Without Mockito it all works like a champ. So, any notes on how to mock?
@qwarlockz8017
3 жыл бұрын
oops! I got it to use the @ExtendWith(MockitoExtension.class) I needed to add java -jar junit-platform-console-standalone MyTest -cp mockito-core-3.7.0.jar:mockito-junit-jupiter-3.7.0.jar:byte-buddy-dep-1.10.19.jar:byte-buddy-agent-1.10.19.jar:objenesis-3.1.jar:asm-9.0.jar That got it to run from command line. Yeay!
@tech_with_moss
3 жыл бұрын
Glad you got it working! I haven't tried using the launcher with Mockito yet, but I'll have to check it out.
nice job, please keep up the good work.
Nice Video Moss. Keep up the good work. TnQ
@tech_with_moss
2 жыл бұрын
Thanks, Faizur! Will do.
nice briefing
Is possible to execute testcase in testlink automatically using jenkin?
you entered a list of java file, but what if I have a project fuul of java sources with tests? Do I type every one of them?
@tech_with_moss
2 жыл бұрын
Hi Avi. I believe it is possible to specify a file pattern or even a directory (such as "*.java" or "test_dir/") so that you don't have to specify each file.
Hey do you have Discord i would like to ask u some stuff