Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider e63271e7 rédigé par Faezeh KHORRAM's avatar Faezeh KHORRAM :speech_balloon:
Parcourir les fichiers

add new ways for input modification

parent b9d5c8d9
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -197,6 +197,15 @@ public class TDLTestInputDataAmplification {
Block copyContainer = ((CompoundBehaviour) copyTdlTestCase.getBehaviourDescription().getBehaviour()).getBlock();
copyContainer.getBehaviour().addAll(allNewMessages);
generatedTestsByEventCreation.add(copyTdlTestCase);
//for this new test case having several new messages, amplify it by other operators: duplication, permutation, deletion
TestDescription inputTestCase = this.tdlTestCase;
tdlTestCase = copyTdlTestCase;
generatedTestsByEventCreation.addAll(generateTestsByEventDuplication());
generatedTestsByEventCreation.addAll(generateTestsByEventPermutation());
if (newMessages.size() > 2) {
generatedTestsByEventCreation.addAll(generateTestsByEventDeletion());
}
tdlTestCase = inputTestCase;
}
newMessages.forEach(m -> newMessagesForNotUsedEvents.add(copyTdlMessage(m)));;
n++;
......@@ -208,7 +217,17 @@ public class TDLTestInputDataAmplification {
Block copyContainer = ((CompoundBehaviour) copyTdlTestCase.getBehaviourDescription().getBehaviour()).getBlock();
copyContainer.getBehaviour().addAll(newMessagesForNotUsedEvents);
generatedTestsByEventCreation.add(copyTdlTestCase);
}
//for this new test case having several new messages, amplify it by other operators: duplication, permutation, deletion
TestDescription inputTestCase = this.tdlTestCase;
tdlTestCase = copyTdlTestCase;
generatedTestsByEventCreation.addAll(generateTestsByEventDuplication());
generatedTestsByEventCreation.addAll(generateTestsByEventPermutation());
if (n > 2) {
generatedTestsByEventCreation.addAll(generateTestsByEventDeletion());
}
tdlTestCase = inputTestCase;
}
return generatedTestsByEventCreation;
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter