From ec9a72b560ed4743371732134d1b9971ec727992 Mon Sep 17 00:00:00 2001 From: Dhruv Dhamani Date: Wed, 31 Jan 2024 15:20:50 -0500 Subject: [PATCH] updated JUnit and PITest, fixed mutation testing shell command --- src/grade.rs | 4 ++-- src/java.rs | 24 +++++++++++++++++------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/grade.rs b/src/grade.rs index e9f581e64..e8df6e314 100644 --- a/src/grade.rs +++ b/src/grade.rs @@ -1328,7 +1328,7 @@ impl UnitTestGrader { .args([ "--class-path", classpath()?.as_str(), - "org.pitest.mutation test.commandline.MutationCoverageReport", + "org.pitest.mutationtest.commandline.MutationCoverageReport", "--reportDir", "test_reports", "--failWhenNoMutations", @@ -1386,7 +1386,7 @@ impl UnitTestGrader { let penalty = diags.len() as u32 * 4; eprintln!("Ran mutation tests for {} -", target_test.join(", ")); let num_diags = diags.len(); - eprintln!("Problematic mutation test failures printed about."); + eprintln!("Problematic mutation test failures printed above."); let prompt = if num_diags > 0 { let context = get_source_context(diags.clone(), project, 3, 6, 6, false, None)?; diff --git a/src/java.rs b/src/java.rs index 99217a332..c150503bc 100644 --- a/src/java.rs +++ b/src/java.rs @@ -1238,7 +1238,7 @@ impl Project { let handle1 = tokio::spawn(async { download( - "https://ummfiles.fra1.digitaloceanspaces.com/jar_files/junit-platform-console-standalone-1.9.0-RC1.jar", + "https://ummfiles.fra1.digitaloceanspaces.com/jar_files/junit-platform-console-standalone-1.10.1.jar", &LIB_DIR.join(JUNIT_PLATFORM), false ) @@ -1256,7 +1256,7 @@ impl Project { let handle3 = tokio::spawn(async { download( - "https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-1.9.5.jar", + "https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-1.15.6.jar", &LIB_DIR.join("pitest.jar"), false, ) @@ -1265,7 +1265,7 @@ impl Project { let handle4 = tokio::spawn(async { download( - "https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-command-line-1.9.5.jar", + "https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-command-line-1.15.6.jar", &LIB_DIR.join("pitest-command-line.jar"), false, ) @@ -1274,7 +1274,7 @@ impl Project { let handle5 = tokio::spawn(async { download( - "https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-entry-1.9.5.jar", + "https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-entry-1.15.6.jar", &LIB_DIR.join("pitest-entry.jar"), false, ) @@ -1283,15 +1283,25 @@ impl Project { let handle6 = tokio::spawn(async { download( - "https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-junit5-plugin-1.0.0.jar", + "https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-junit5-plugin-1.2.1.jar", &LIB_DIR.join("pitest-junit5-plugin.jar"), false, ) .await }); - let handles = - FuturesUnordered::from_iter([handle1, handle2, handle3, handle4, handle5, handle6]); + let handle7 = tokio::spawn(async { + download( + "https://ummfiles.fra1.digitaloceanspaces.com/jar_files/commons-lang3-3.14.0.jar", + &LIB_DIR.join("commons-lang3-3.14.0.jar"), + false, + ) + .await + }); + + let handles = FuturesUnordered::from_iter([ + handle1, handle2, handle3, handle4, handle5, handle6, handle7, + ]); futures::future::try_join_all(handles).await?; }