Module UnitTests

Provides classes and predicates for working with test classes and methods.

Import path

semmle.code.java.UnitTests

Imports

JUnitAnnotations

Provides classes and predicates for working with annotations from the JUnit framework.

Member

Provides classes and predicates for working with members of Java classes and interfaces, that is, methods, constructors, fields and nested types.

Type

Provides classes and predicates for working with Java types.

Classes

JUnit38TestClass

A JUnit 3.8 test class.

JUnit3TestMethod

A test method declared within a JUnit 3.8 test class.

JUnit3TestSuite

A JUnit 3.8 test suite method.

JUnit4TestMethod

A JUnit test method that is annotated with the org.junit.Test annotation.

JUnitCategoryAnnotation

A @Category annotation on a class or method, that categorizes the annotated test.

JUnitIgnoreAnnotation

A JUnit @Ignore annotation.

JUnitIgnoredMethod

A method which, directly or indirectly, is treated as ignored by JUnit due to a @Ignore annotation.

JUnitJupiterTestMethod

A JUnit test method that is annotated with the org.junit.jupiter.api.Test annotation.

JUnitTheoryTest

A test class that will be run with theories.

ParameterizedJUnitTest

A class that will be run using the org.junit.runners.Parameterized JUnit runner.

TearDownMethod

A JUnit 3.8 tearDown method.

TestClass

A class detected to be a test class, either because it is a JUnit test class or because its name or the name of one of its super-types contains the substring “Test”.

TestMethod

Any method detected to be a test method of a common testing framework, including JUnit and TestNG.

TestNGAfterAnnotation

A TestNG annotation used to mark a method that runs “after”.

TestNGAnnotation

An annotation in TestNG.

TestNGBeforeAnnotation

A TestNG annotation used to mark a method that runs “before”.

TestNGDataProviderAnnotation

An annotation of type org.testng.annotations.DataProvider which is applied to methods to mark them as data provider methods for TestNG.

TestNGDataProviderMethod

A method annotated with org.testng.annotations.DataProvider marking it as a data provider method for TestNG.

TestNGFactoryAnnotation

An annotation of type org.testng.annotations.Factory which is applied to methods to mark them as factory methods for TestNG.

TestNGFactoryCallable

A constructor or method annotated with org.testng.annotations.Factory marking it as a factory for TestNG.

TestNGListenerImpl

A concrete implementation class of one or more of the TestNG listener interfaces.

TestNGListenersAnnotation

An annotation of type org.testng.annotations.Listeners which is applied to classes to define which listeners apply to them.

TestNGTestAnnotation

An annotation of type org.test.ng.annotations.Test.

TestNGTestMethod

A TestNG test method, annotated with the org.testng.annotations.Test annotation.

TypeJUnitTest

The Java interface junit.framework.Test.

TypeJUnitTestCase

The Java class junit.framework.TestCase.

TypeJUnitTestSuite

The Java class junit.framework.TestSuite.