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

Migrate test system from junit 4 to junit 5 #856

Merged
merged 41 commits into from
Feb 23, 2024
Merged

Migrate test system from junit 4 to junit 5 #856

merged 41 commits into from
Feb 23, 2024

Conversation

JonasKlauke
Copy link
Collaborator

Update all tests to the API changes in juint 5

JonasKlauke and others added 29 commits February 14, 2024 11:54
Copy link
Contributor

You updated the documentation - Doc Preview.

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.91%. Comparing base (fee3451) to head (9c11249).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #856      +/-   ##
=============================================
- Coverage      68.11%   67.91%   -0.20%     
+ Complexity      3852     3848       -4     
=============================================
  Files            310      310              
  Lines          15225    15225              
  Branches        2590     2590              
=============================================
- Hits           10370    10340      -30     
- Misses          3941     3965      +24     
- Partials         914      920       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@swissiety swissiety left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good work!

To avoid @Tag problems with typos lets replace @Tag\(\"Java([8|9])\"\) by @Tag(TestCategories.JAVA_$i_CATEGORY) and add a categories class file to each module like its done in the bytecode module ( or can we move it to core and reuse it in the other modules?)

@swissiety
Copy link
Collaborator

swissiety commented Feb 16, 2024

just from the added timing in the java8 run (+2minutes) I would assume the testwatcher is not caching?

  • investigate

@JonasKlauke
Copy link
Collaborator Author

I added on many testclasses a Tag which had no category before. That could be the reason. Since we also gained coverage

@JonasKlauke
Copy link
Collaborator Author

The Enum Tag is good and yeah we should go for only one Enum. If every module imports core then we can simply put it there

# Conflicts:
#	sootup.java.bytecode/src/test/java/sootup/java/bytecode/Soot1577Test.java
# Conflicts:
#	sootup.core/src/test/java/sootup/core/graph/MutableBasicBlockTest.java
#	sootup.core/src/test/java/sootup/core/graph/MutableBlockStmtGraphTest.java
#	sootup.core/src/test/java/sootup/core/jimple/basic/LocalGeneratorTest.java
#	sootup.java.bytecode/src/test/java/sootup/java/bytecode/RuntimeJarConversionTests.java
#	sootup.java.bytecode/src/test/java/sootup/java/bytecode/interceptors/CastAndReturnInlinerTest.java
#	sootup.java.bytecode/src/test/java/sootup/java/bytecode/minimaltestsuite/MinimalBytecodeTestSuiteBase.java
#	sootup.java.bytecode/src/test/java/sootup/java/bytecode/minimaltestsuite/java11/TypeInferenceLambdaTest.java
#	sootup.java.bytecode/src/test/java/sootup/java/bytecode/minimaltestsuite/java15/MultilineStringsTest.java
#	sootup.java.bytecode/src/test/java/sootup/java/bytecode/minimaltestsuite/java6/AnnotationUsageInheritedTest.java
#	sootup.java.bytecode/src/test/java/sootup/java/bytecode/minimaltestsuite/java6/AnnotationUsageTest.java
#	sootup.java.bytecode/src/test/java/sootup/java/bytecode/minimaltestsuite/java6/NestedAnnotationTest.java
#	sootup.java.bytecode/src/test/java/sootup/java/bytecode/minimaltestsuite/java6/VisibleAnnotationTest.java
#	sootup.java.bytecode/src/test/java/sootup/java/bytecode/minimaltestsuite/java9/DynamicInvokeTest.java
#	sootup.java.core/src/test/java/sootup/java/core/printer/JimplePrinterTest.java
#	sootup.java.core/src/test/java/sootup/java/core/printer/LegacyJimplePrinterTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/frontend/SwitchConversionTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java10/TypeInferenceTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/AnnotationLibraryTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/CastingInNumTypesTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/DeclareConstructorTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/DeclareFieldTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/DeclareFloatTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/DeclareIntTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/DeclareLongTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/GenTypeParamTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/InstanceOfCheckTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/InterfaceImplClassTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/MethodOverloadingTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/MethodOverridingTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/MultiInterfaceImplClassTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/NativeMethodTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/ReferencingThisTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/ReflectionTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/StaticImportTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/StaticInitializerTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/StaticMethodTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/StaticVariableTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/SubClassTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/SuperClassTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/SynchronizedMethodTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/TernaryOperatorTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/ThrowExceptionMethodTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/TransientVariableTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/UnaryOpIntTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/UncheckedCastTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/UnicodeMethodNameTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/VirtualMethodTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java6/VolatileVariableTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java8/DefaultMethodInterfaceImplTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java8/MethodAcceptingLamExprTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java8/MethodReferenceTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java8/RepeatingAnnotationsTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java8/StaticMethodInterfaceImplTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java9/AnonymousDiamondOperatorTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java9/PrivateMethodInterfaceImplTest.java
#	sootup.java.sourcecode/src/test/java/sootup/java/sourcecode/minimaltestsuite/java9/TryWithResourcesConciseTest.java
#	sootup.jimple.parser/src/test/java/sootup/jimple/parser/javatestsuite/java9/DynamicInvokeTest.java
#	sootup.tests/src/test/java/sootup/tests/WitherTest.java
@JonasKlauke
Copy link
Collaborator Author

Enum moved to #859

# Conflicts:
#	sootup.tests/src/test/java/sootup/tests/ReplaceUseExprVisitorTest.java
#	sootup.tests/src/test/java/sootup/tests/ReplaceUseRefVisitorTest.java
#	sootup.tests/src/test/java/sootup/tests/ReplaceUseStmtVisitorTest.java
@swissiety swissiety merged commit 87d4748 into develop Feb 23, 2024
10 checks passed
@swissiety swissiety deleted the migrateJunit branch February 23, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants