INRIA / INRIA/spoon

Add CI check that newly added test classes don't use JUnit4

Open
#4,133 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
392
Avg merge
11h 24m
Merged PRs (30d)
36

Description

We need a check in CI that verifies that added test classes don't use JUnit4. See below for details.

> > Do we have any test that performs checks on newly added files (according to Git)?
>
> Not that I remember in Spoon.
>
> But we have done some work in this direction with https://github.com/STAMP-project/dspot/tree/master/dspot-diff-test-selection (led by @danglotb)

That's a li'l bit overkill, all we need is to do is find added `.java` files and check if any of them contain suspicious references (in particular, `org.junit.Test` and `org.junit.Assert`). We can do that sufficiently robustly with just `git-diff` and `grep`.

_Originally posted by @slarse in https://github.com/INRIA/spoon/issues/4125#issuecomment-906312622_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.