STAMP-project / dspot

Automatically detect and generate missing assertions for Junit test cases (also known as test amplification)
https://dspot-demo.stamp-project.eu/
GNU Lesser General Public License v3.0
114 stars 28 forks source link

Gradle7 java11+ Support #1003

Closed lacinoire closed 2 years ago

lacinoire commented 2 years ago

These changes re-enable Gradle Support for DSpot. I adapted the automatic builder & tests to fit Gradle 7 and am actively using it with gradle in test-cube. Unignored a lot of the existing test cases around Gradle πŸ™‚

I tested DSpot with Java 11 and Java 16 (16 only as jdk with the test) and added the new compatabilities to the readme. Java 11 works well, for Java 16 the funcitonality of running tests with maven is currently failing (though that might be my maven setup)

Shortened the readme by putting the long command line options in a default-collapsed <details> tag πŸ™‚

danglotb commented 2 years ago

Hello @lacinoire

Thank you very much for the changes, look awesome. Waiting for the CI! :smile:

lacinoire commented 2 years ago

CommentTest.testAmplifierComments failed again :/

In my next PR I tried making this test less specific (only checks for the comment, not for the exact modified line), so it should pass also when slightly different tests are generated during the tests. (πŸ‘‰πŸΌ https://github.com/TestShiftProject/dspot/blob/0038e9f82a590b0be5c05742b6a1962b21f2fc7a/dspot/src/test/java/eu/stamp_project/dspot/common/configuration/options/CommentTest.java#L126) Those changes include the ones from this PR, so I'm waiting with opening until this one is merged πŸ™‚

codecov-commenter commented 2 years ago

Codecov Report

Merging #1003 (64eef46) into master (5597805) will increase coverage by 1.74%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1003      +/-   ##
============================================
+ Coverage     71.25%   72.99%   +1.74%     
- Complexity     1460     1487      +27     
============================================
  Files           134      134              
  Lines          6359     6359              
  Branches        757      757              
============================================
+ Hits           4531     4642     +111     
+ Misses         1490     1379     -111     
  Partials        338      338              
Impacted Files Coverage Ξ”
...common/automaticbuilder/gradle/GradleInjector.java 70.23% <ΓΈ> (+44.04%) :arrow_up:
...on/configuration/options/AutomaticBuilderEnum.java 100.00% <0.00%> (+20.00%) :arrow_up:
...ct/dspot/amplifier/SimpleInputAmplDistributor.java 98.48% <0.00%> (+25.75%) :arrow_up:
...utomaticbuilder/gradle/GradleAutomaticBuilder.java 80.00% <0.00%> (+80.00%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 5597805...64eef46. Read the comment docs.

danglotb commented 2 years ago

Thank @lacinoire Waiting for your next contributions with impatience :smile: Good job there!