JUnit 4 with IntelliJ: Exceptions, Ignore, ... @DrBFraser
JUnit 4 with IntelliJ: Exceptions, Ignore, ...  @DrBFraser
Uploaded June 2016 | Updated September 2026, 2 weeks ago
More JUnit 4 features in IntelliJ including:
- testing exceptions
- @Ignore, @Before,
- Run with coverage IntelliJ

See previous video: youtu.be/Bld3644bIAo


Video Steps
- Annotations
@Test annotation
import static org.junit.Assert.* // Needed because not inheriting from TestCase.

- Test method which throws an exception
- @Ignore
Visibly documents that the test is not enabled and should be in the future?

- Run with code coverage
Run, Run ... with Coverage

- Fixture:
@Before
@After

// Run once before/after any tests are run from this class.
// Useful for things like populating a DB or read-only file.
@BeforeClass
@AfterClass


- Timeouts
JUnit 4 with IntelliJ: Exceptions, Ignore, ...Cross Debugging SegFaults with GDB: Embedded LinuxWorking with Layouts: Android ProgrammingAlertDialog via Fragment: Android ProgrammingConnect/Remove Beaglebone Capepthreads #1: IntroductionOptiTune: Remote Desktop SupportGit in Android Studio (basic): Android Programming
Brian Fraser |

JUnit 4 with IntelliJ: Exceptions, Ignore, ...

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER