Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
naomod
faezeh-public
XTDL
Commits
e63271e7
Commit
e63271e7
authored
May 09, 2022
by
Faezeh KHORRAM
💬
Browse files
add new ways for input modification
parent
b9d5c8d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
org.imt.tdl.amplification/src/org/imt/tdl/amplification/TDLTestInputDataAmplification.java
View file @
e63271e7
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment