From the course: Advanced Selenium: Automation Frameworks
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Introducing JUnit - Selenium Tutorial
From the course: Advanced Selenium: Automation Frameworks
Introducing JUnit
- Hi, so let's go ahead and talk about JUnit for a bit. JUnit is Java's most popular unit testing framework. It actually is the most included library in all of the Java projects on GitHub. Let's go ahead and take a look at JUnit in the IDE. On the left side of the screen, in IntelliJ, you'll see the project pane. In the project pane, open the source directory, abbreviated SRC, and then you should see a test directory. Open the test directory and underneath there's a Java package, right click on it. And we're going to create a new package to keep our tests in. There we go. And then on that package we've created, go ahead and right click and inside of that we're going to create a new Java class. We're going to name our class, Selenium test. So, by default, JUnit will actually run all of the classes it finds in this test directory here. We tend to use class names ending in test just as a sort of convention when we're doing…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Getting Started with Java46s
-
(Locked)
Managing packages with Maven4m 2s
-
(Locked)
Introducing JUnit2m 27s
-
(Locked)
Introducing Selenide1m 14s
-
(Locked)
Testing with Selenide: Navigate and wait3m 54s
-
(Locked)
Testing with Selenide: Inputs4m 36s
-
(Locked)
Testing with Selenide: Assertions3m 6s
-
(Locked)
-