Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider separate artifacts for JUnit 4 and JUnit 5 #1363

Closed
alvarezguille opened this issue May 18, 2022 · 3 comments · Fixed by #1550 or #1558
Closed

Consider separate artifacts for JUnit 4 and JUnit 5 #1363

alvarezguille opened this issue May 18, 2022 · 3 comments · Fixed by #1550 or #1558
Assignees

Comments

@alvarezguille
Copy link
Member

Now that Java UI test project is in progress TestBench has dependencies to both JUnit 4 and JUnit 5

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit5.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit5.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit5.version}</version>
<scope>test</scope>
</dependency>

This can be inconvenient for users when writing tests as it's possible to accidentally mix JUnit versions and get unexpected results, for instance: wrong imports, wrong annotations or wrong asserts.

One option discussed previously was about having different specific artifacts for JUnit 4 and JUnit 5. There was a previous preparation for this approach from @Artur- by creating a shared module in #1318.

@MarcinVaadin MarcinVaadin self-assigned this Oct 11, 2022
@MarcinVaadin
Copy link
Member

Will be done as part of vaadin/flow#14784

@MarcinVaadin
Copy link
Member

Changes pushed to #1550

@MarcinVaadin
Copy link
Member

Reopenning as vaadin-testbench-unit-tests modules is using both junit4 and junit5 tests and it should also be splitted.

@MarcinVaadin MarcinVaadin linked a pull request Oct 24, 2022 that will close this issue
9 tasks
mshabarov pushed a commit that referenced this issue Oct 27, 2022
Separation of vaadin-testbench-unit into three modules:

vaadin-testbench-unit-shared (common parts, no direct junit dependency)
vaadin-testbench-unit (junit4)
vaadin-testbench-unit-junit5 (junit5)

Fixes #1363
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants