Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[testGeneration] Fixing platform specific tests for Umple model/ignor…
…eing unrelated targeted tests. In addition to adding a generic mechanism to write test template for elements such as attribute/method/association. This is done by declaring non-specific test as 'generic' and pass the type of Umple element you want to generically generate your test template for using <<elementType>> as a generic attribute within the test case. This aims to target large number of elements in big models and cut time/cost, also to over come some limitations of the language, in case a developer wants to write their own templates.. The type of element to be targeted for generic test generation will be narrowed down with parameters, for instance, one can write any number of test template for all attributes of type String and for method, it would be by declaring element:method and indicating the type of parameters and returned value. .details in usermanual will be provided soon
- Loading branch information
Showing
12 changed files
with
327 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
cruise.umple/test/cruise/umple/implementation/test/GenericTestCase.ump
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,25 @@ | |||
|
|||
class Person { | |||
|
|||
id; | |||
name; | |||
address; | |||
|
|||
|
|||
generic test checkifLogged(attribute){ | |||
Person p1 ( "S1425", "John", "Ottawa") ; | |||
String valueToCheck = p1.get<<attribute>>(); | |||
ps1.getValue(<<attribute>>); | |||
boolean isLogged = p1.checkIsLogged(valueToCheck); | |||
assertTrue(logged == "true"); | |||
} | |||
|
|||
|
|||
|
|||
|
|||
|
|||
String returnSumOfValues (int x, int y) { return x+y;} | |||
|
|||
} | |||
|
|||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.