Skip to main content
blog title image

1 minute read - Java For Testers Java JUnit

FAQ: Why are my JUnit 4 asserts showing as deprecated

Aug 30, 2013

“Why are my Junit 4 asserts deprecated?”

JUnit has a tendency to move code around, but it deprecates the old code, and there is usually a comment in the JUnit code somewhere explaining what to use instead.

But a common question on the Start Selenium WebDriver course relates to “Why are my asserts deprecated” and its usually because JUnit codebase has changed.

These changes are usually for the better, so keeping our code up to date and changing the import statements is a small price to pay.

Short Answer? Use the import from org.junit.Assert