blob: a9d54a55aa2d92f7ebdd18ad5309dfea8f48491b [file] [log] [blame]
--- RCPTT testcase ---
Format-Version: 1.0
Contexts: _hhG3gN-5EeWCq4DNYCV1CA
Element-Name: TC-AProjectCreation
Element-Type: testcase
Element-Version: 3.0
External-Reference: http://www.omg.org/spec/SysML/1.4/Beta/
Id: _o7wVwPcTEeWxocwBxVlvGA
Runtime-Version: 2.1.0.201605101848
Save-Time: 5/12/16 2:21 PM
Testcase-Type: ecl
------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
Content-Type: text/plain
Entry-Name: .description
This testcase test the basic creation of a sysml 1.4 project.
------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
//
// Basic SysML model creation with several screenshots for the user guide
//
//Step: creation of the sysml project with Papyrus
get-menu "File/New/Project..." | click
get-window "New Project" | get-tree | select "Papyrus/Papyrus Project"
get-window "New Project" | get-tree | get-item "Papyrus/Papyrus Project" | get-property caption
| equals "Papyrus Project" | verify-true
get-window "New Project" | get-button "Next >" | click
with [get-window "New Papyrus Project"] {
with [get-group "Diagram Language:"] {
get-button "SysML 1.4" | click
}
get-object | save-screenshot [full-path "projectcreation-selectsysml14project"]
get-button "Next >" | click
with [get-editbox -after [get-label "Project name:"]] {
set-text MyFirstSysML14Project
}
get-group "Model file name:" | get-editbox | set-text mymodel
get-object | save-screenshot [full-path "projectcreation-projectname"]
get-button "Next >" | click
}
with [get-window "New Papyrus Project" | maximize | get-group "Select a Diagram Kind:"]{
get-object | save-screenshot [full-path "projectcreation-diagrams"]
}
with [get-window "New Papyrus Project" | get-group "Select a Diagram Kind:" | get-table] {
select "SysML 1.4 Block Definition" -column "Diagram name"
get-cell 0 0 | check
}
with [get-window "New Papyrus Project" | get-group "Select a Diagram Kind:" | get-table] {
select "SysML 1.4 Internal Block" -column "Diagram name"
get-cell 1 0 | check
}
with [get-window "New Papyrus Project" | get-group "Select a Diagram Kind:" | get-table] {
select "SysML 1.4 Requirement Table" -column "Diagram name"
get-cell 5 0 | check
}
get-window "New Papyrus Project" | get-button Finish | click
get-menu "Window/Perspective/Open Perspective/Other..." | click
get-window "Open Perspective" | get-table | select "Papyrus \\(default\\)"
get-window "Open Perspective" | get-table | get-item "Papyrus \\(default\\)" | get-property caption | equals "Papyrus \\(default\\)" | verify-true
with [get-window "Open Perspective"] {
get-object | save-screenshot [full-path "projectcreation-papyrusperspective"]
get-table | select "Papyrus \\(default\\)"
get-button OK | click
}
with [get-editor "mymodel.di"] {
get-tab-folder | get-tab-item "SysML 1.4 Block Definition" | click
get-diagram -index 1 | get-edit-part -name RootElement | mouse-move 655 185 -height 342 -width 656
with [get-palette | get-palette-entry Block] {
mouse-move 66 1 button1 -height 24 -width 125
mouse-press 66 1 button1 -height 24 -width 125
mouse-release 66 1 button1 524288 -height 24 -width 125
}
with [get-diagram -index 1 | get-edit-part -name RootElement] {
mouse-move 165 103 button1 -height 342 -width 656
mouse-press 165 103 button1 -height 342 -width 656
mouse-release 165 103 button1 524288 -height 342 -width 656
}
with [get-diagram -index 1] {
with [get-edit-part -name RootElement] {
get-edit-part -name Block2 | get-edit-part -text "Block2" | activate-direct-edit
mouse-move 388 166 button1 -height 342 -width 656
mouse-press 388 166 button1 -height 342 -width 656
}
commit-direct-edit
get-figure "1/21" | mouse-release 42 30 button1 524288 -height 40 -width 310
get-edit-part -name RootElement | mouse-move 644 195 -height 342 -width 656
}
get-palette | get-palette-entry Allocate | mouse-move 113 21 -height 24 -width 125
}
//SCREENSHOTS
//create a screenshot with only the whiteboard
with [get-editor "mymodel.di" | get-diagram -index 1 ] {
get-object | save-screenshot [full-path "projectcreation-papyrus-bdd"]
}
//create a screenshot of the di tab and the palette
find-tab-folder "SysML 1.4 Block Definition" | get-object | save-screenshot [full-path "projectcreation-diwithpalette"]
//Creation of Part typed by a Block
with [get-editor "mymodel.di"] {
with [get-palette] {
with [get-palette-entry Part] {
mouse-move 45 12 button1 -height 24 -width 125
mouse-press 45 12 button1 -height 24 -width 125
mouse-release 45 12 button1 524288 -height 24 -width 125
mouse-hover 45 12 -height 24 -width 125
mouse-move 9 18 -height 24 -width 125
}
}
with [get-diagram -index 1 | get-edit-part -name RootElement | get-edit-part -name Block2 | get-edit-part
-className ClassAttributeCompartmentEditPart] {
mouse-move 13 9 button1 -height 25 -width 117
mouse-press 13 9 button1 -height 25 -width 117
mouse-hover 13 9 -mask 524288 -height 25 -width 117
mouse-release 13 9 button1 524288 -height 25 -width 117
}
}
with [get-window -class CreateOrSelectBlockPropertyTypeDialog] {
get-section "Create a new type" | get-editbox -after [get-label "Select new type name"] | set-text Block3
get-button OK | click
}
with [get-editor "mymodel.di" | get-diagram -index 1 ] {
get-object | save-screenshot [full-path "projectcreation-papyrus-bdd2"]
}
//create a screenshot of the di tab and the palette
find-tab-folder "Model Explorer" | get-object | save-screenshot [full-path "projectcreation-modelexplorer"]
//open the model explorer
get-view "Model Explorer" | get-tree | get-item "RootElement/«Block» Block2" | click
get-editor "mymodel.di" | get-diagram -index 1 | get-edit-part -name RootElement | mouse-move 103 19 -height 342
-width 656
//create a screenshot of ModelExplorer
get-view "Model Explorer" | get-tree | get-item "RootElement/«Block» Block2/Attribute1 : Block3" | click
find-tab-folder "Model Explorer" | get-object | save-screenshot [full-path "projectcreation-modelexplorer2"]
//create a screenshot of Outline
find-tab-folder "Outline" | get-object | save-screenshot [full-path "projectcreation-outline"]
//ok up
with [get-editor "mymodel.di"] {
get-diagram -index 1 | get-edit-part -name RootElement | mouse-move 60 339 -height 342 -width 656
get-tab-folder | get-tab-item "SysML 1.4 Internal Block" | click
with [get-diagram -index 1 | get-edit-part -name Block1] {
mouse-move 81 291 -height 342 -width 656
with [get-edit-part -name Block1] {
mouse-press 78 12 button1 -height 250 -width 500
mouse-release 78 12 button1 524288 -height 250 -width 500
}
}
}
//create a screenshot of the di tab and the palette
find-tab-folder "SysML 1.4 Internal Block" | get-object | save-screenshot [full-path "projectcreation-ibd-diwithpalette"]
with [get-editor "mymodel.di" | get-diagram -index 1 | get-edit-part -name Block1] {
mouse-move 338 305 -height 342 -width 656
mouse-move 2 167 -height 342 -width 656
mouse-move 4 453 -height 486 -width 656
}
with [get-view "Model Explorer" | get-tree] {
get-item "RootElement/«Block» Block3" | click
get-item "RootElement/«Block» Block3" | drag-start 10 12
}
with [get-editor "mymodel.di" | get-diagram -index 1 | get-edit-part -name Block1] {
drag-enter 3 306 -detail move
with [get-edit-part -name Block1] {
drag-over 7 224 -detail copy
get-edit-part -className ClassCompositeCompartmentEditPart | get-figure "1/0" | drag-over 84 75 -detail copy
}
drag-exit
get-edit-part -name Block1 | get-edit-part -className ClassCompositeCompartmentEditPart | get-figure "1/0"
| drag-accept 84 75 -detail copy
}
get-view "Model Explorer" | get-tree | drag-set-data
get-editor "mymodel.di" | get-diagram -index 1 | get-edit-part -name Block1 | get-edit-part -name Block1
| get-edit-part -className ClassCompositeCompartmentEditPart | get-figure "1/0" | drop 84 75 -detail copy
get-view "Model Explorer" | get-tree | drag-end -detail copy
with [get-editor "mymodel.di"] {
get-diagram -index 1 | get-edit-part -name Block1 | mouse-move 653 258 -height 486 -width 656
with [get-palette] {
with [get-palette-entry Part] {
mouse-move 49 15 button1 -height 24 -width 125
mouse-press 49 15 button1 -height 24 -width 125
mouse-release 49 15 button1 524288 -height 24 -width 125
}
}
with [get-diagram -index 1 | get-edit-part -name Block1 | get-edit-part -name Block1 | get-edit-part
-className ClassCompositeCompartmentEditPart] {
mouse-move 367 91 button1 -height 215 -width 500
mouse-press 367 91 button1 -height 215 -width 500
mouse-release 367 91 button1 524288 -height 215 -width 500
}
}
get-window -class CreateOrSelectBlockPropertyTypeDialog | get-button OK | click
with [get-editor "mymodel.di" | get-diagram -index 1 | get-edit-part -name Block1] {
mouse-move 300 366 button1 -height 486 -width 656
mouse-press 300 366 button1 -height 486 -width 656
mouse-release 300 366 button1 524288 -height 486 -width 656
mouse-move 536 290 -height 486 -width 656
with [get-edit-part -name Block1] {
mouse-move 491 247 -height 250 -width 500
mouse-hover 491 247 -height 250 -width 500
}
}
//create a screenshot of the di tab and the palette
find-tab-folder "SysML 1.4 Internal Block" | get-object | save-screenshot [full-path "projectcreation-ibd-2"]
with [get-editor "mymodel.di"] {
get-diagram -index 1 | get-edit-part -name Block1 | mouse-move 616 130 -height 342 -width 662
with [get-palette] {
with [get-palette-entry Port] {
mouse-move 54 15 button1 -height 24 -width 125
mouse-press 54 15 button1 -height 24 -width 125
mouse-release 54 15 button1 524288 -height 24 -width 125
mouse-hover 54 15 -height 24 -width 125
}
}
with [get-diagram -index 1 | get-edit-part -name Block1 | get-edit-part -name Block1 | get-edit-part
-className ClassCompositeCompartmentEditPart] {
mouse-move 196 93 -height 215 -width 500
with [get-edit-part -name "block3" ] {
mouse-move 146 13 button1 -height 40 -width 149
mouse-press 146 13 button1 -height 40 -width 149
mouse-hover 146 13 -mask 524288 -height 40 -width 149
mouse-release 146 13 button1 524288 -height 40 -width 149
}
}
with [get-diagram -index 1 | get-edit-part -name Block1] {
with [get-edit-part -name Block1 | get-edit-part -className ClassCompositeCompartmentEditPart] {
with [get-edit-part -name "block3" | get-edit-part -name Port1] {
mouse-move 9 10 button1 -height 20 -width 20
mouse-press 9 10 button1 -height 20 -width 20
mouse-move 9 11 -mask 524288 -height 20 -width 20
}
mouse-drag 203 116 button1 524288 -height 215 -width 500
mouse-release 203 116 button1 524288 -height 215 -width 500
}
mouse-move 647 95 -height 342 -width 656
}
with [get-palette] {
get-palette-entry Optional | mouse-move 40 23 -height 24 -width 125
get-palette-entry Part | mouse-move 52 22 -height 24 -width 125
get-palette-entry ParticipantProperty | mouse-move 57 23 -height 24 -width 125
with [get-palette-entry Port] {
mouse-move 55 8 button1 -height 24 -width 125
mouse-press 55 8 button1 -height 24 -width 125
mouse-release 55 8 button1 524288 -height 24 -width 125
mouse-hover 55 8 -height 24 -width 125
}
}
with [get-diagram -index 1 | get-edit-part -name Block1 | get-edit-part -name Block1 | get-edit-part
-className ClassCompositeCompartmentEditPart] {
mouse-move 377 89 -height 215 -width 500
with [get-edit-part -name Attribute1] {
mouse-move 8 3 -height 40 -width 171
mouse-hover 8 3 -height 40 -width 171
mouse-move 8 3 button1 -height 40 -width 171
mouse-press 8 3 button1 -height 40 -width 171
mouse-release 8 3 button1 524288 -height 40 -width 171
}
}
with [get-diagram -index 1 | get-edit-part -name Block1] {
with [get-edit-part -name Block1] {
with [get-edit-part -className ClassCompositeCompartmentEditPart] {
mouse-move 290 53 -height 215 -width 500
mouse-hover 290 53 -height 215 -width 500
mouse-move 290 53 button1 -height 215 -width 500
mouse-press 290 53 button1 -height 215 -width 500
mouse-release 290 53 button1 524288 -height 215 -width 500
mouse-move 200 84 -height 215 -width 500
with [get-edit-part -name "block3"] {
mouse-move 56 4 button1 -height 40 -width 149
mouse-press 56 4 button1 -height 40 -width 149
mouse-hover 54 4 -height 40 -width 149
mouse-release 56 4 button1 524288 -height 40 -width 149
mouse-move 54 4 button1 -height 40 -width 149
mouse-press 54 4 button1 -height 40 -width 149
mouse-hover 48 1 -mask 524288 -height 40 -width 149
mouse-move 48 1 -mask 524288 -height 40 -width 149
}
mouse-drag 65 31 button1 524288 -height 215 -width 500
mouse-release 65 31 button1 524288 -height 215 -width 500
mouse-move 70 33 -height 215 -width 500
mouse-hover 70 33 -height 215 -width 500
with [get-edit-part -name "block3"] {
mouse-move 24 9 button1 -height 40 -width 149
mouse-press 24 9 button1 -height 40 -width 149
}
mouse-move 45 34 -mask 524288 -height 215 -width 500
}
mouse-drag 35 54 button1 524288 -height 250 -width 500
mouse-release 35 54 button1 524288 -height 250 -width 500
get-edit-part -className ClassCompositeCompartmentEditPart | get-edit-part -name "block3" | mouse-hover 24 9
-height 40 -width 149
}
mouse-move 5 123 -height 342 -width 656
}
with [get-palette] {
get-palette-entry Copy | mouse-move 75 1 -height 24 -width 125
get-palette-entry Conform | mouse-move 74 2 -height 24 -width 125
with [get-palette-entry Connector] {
mouse-move 72 11 button1 -height 24 -width 125
mouse-press 72 11 button1 -height 24 -width 125
mouse-release 72 11 button1 524288 -height 24 -width 125
mouse-hover 72 11 -height 24 -width 125
}
}
with [get-diagram -index 1 | get-edit-part -name Block1 | get-edit-part -name Block1 | get-edit-part
-className ClassCompositeCompartmentEditPart] {
mouse-move 170 31 -height 215 -width 500
with [get-edit-part -name "block3"] {
get-edit-part -name Port1 | mouse-move 13 6 -height 20 -width 20
with [get-handle ResizeHandle -index 1] {
mouse-move 2 5 button1 -height 7 -width 7
mouse-press 2 5 button1 -height 7 -width 7
}
get-edit-part -name Port1 | mouse-move 7 8 -mask 524288 -height 20 -width 20
}
with [get-edit-part -name Attribute1 | get-edit-part -name Port1] {
mouse-drag 10 12 button1 524288 -height 20 -width 20
mouse-release 10 12 button1 524288 -height 20 -width 20
mouse-hover 10 12 -height 20 -width 20
mouse-press 10 12 button1 -height 20 -width 20
}
}
with [get-diagram -index 1] {
with [get-edit-part -name Block1 | get-edit-part -name Block1 | get-edit-part
-className ClassCompositeCompartmentEditPart] {
get-edit-part -name Attribute1 | get-edit-part -name Port1 | mouse-release 10 12 button1 524288 -height 20
-width 20
mouse-move 254 70 -height 215 -width 500
with [get-edit-part -name Attribute1 | get-edit-part -name Port1 | get-target-connection 0] {
mouse-move 107 45 button1 -height 107 -width 182
mouse-press 107 45 button1 -height 107 -width 182
mouse-move 106 44 -mask 524288 -height 107 -width 182
}
}
mouse-drag 298 147 -mask 524288 -height 342 -width 656
with [get-edit-part -name Block1] {
with [get-edit-part -name Block1 | get-edit-part -className ClassCompositeCompartmentEditPart
| get-edit-part -name Attribute1 | get-edit-part -name Port1 | get-target-connection 0
| get-handle BendpointMoveHandleEx] {
mouse-drag 6 3 button1 524288 -height 7 -width 7
mouse-release 6 3 button1 524288 -height 7 -width 7
}
mouse-move 13 176 -height 342 -width 656
}
}
}
//create a screenshot of the di tab and the palette
find-tab-folder "SysML 1.4 Internal Block" | get-object | save-screenshot [full-path "projectcreation-ibd-3"]
//Add a requirement
with [get-editor "mymodel.di"] {
with [get-palette] {
get-palette-entry ParticipantProperty | mouse-move 86 2 -height 24 -width 160
get-palette-entry Part | mouse-move 67 11 -height 24 -width 160
get-palette-entry Optional | mouse-move 21 7 -height 24 -width 160
}
with [get-diagram -index 1 | get-edit-part -name Block1] {
mouse-move 594 106 button1 -height 342 -width 656
mouse-press 594 106 button1 -height 342 -width 656
mouse-release 594 106 button1 524288 -height 342 -width 656
mouse-hover 594 106 -height 342 -width 656
mouse-move 554 102 -height 342 -width 656
mouse-hover 554 102 -height 342 -width 656
mouse-move 556 102 -height 342 -width 656
mouse-hover 556 102 -height 342 -width 656
get-edit-part -name Block1 | mouse-move 490 113 -height 250 -width 500
mouse-move 478 341 -height 342 -width 656
}
get-tab-folder | get-tab-item "SysML 1.4 Requirement Table" | click
}
with [get-view "Model Explorer" | get-tree] {
get-item RootElement | click
select RootElement | get-menu "SysML 1.4 Child/Requirement" | click
}
with [get-view Properties] {
get-editbox -after [get-label Name] | click-text 13
get-property-tab "SysML 1.4" | click
get-editbox -after [get-label Id] | set-text "Req-01"
get-editbox -after [get-label Name] | click-text 13
get-editbox -after [get-label Text] | set-text "My requirement."
get-editbox -after [get-label Id] | click-text 7
}
get-button "Save All (M1+M2+S)" | click
get-view Properties | get-editbox -after [get-label Id] | set-focus
//create a screenshot of the properties
find-tab-folder "Properties" | get-object | save-screenshot [full-path "projectcreation-req-properties"]
//create a screenshot of the di tab and the palette
find-tab-folder "SysML 1.4 Requirement Table" | get-object | save-screenshot [full-path "projectcreation-req"]
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--