Skip to content

Instantly share code, notes, and snippets.

@Robert-96
Last active January 11, 2021 13:39
Show Gist options
  • Save Robert-96/7c6aceafbcffe668a35813c18df4c63e to your computer and use it in GitHub Desktop.
Save Robert-96/7c6aceafbcffe668a35813c18df4c63e to your computer and use it in GitHub Desktop.
AltWalker - Requirements Example Model
{
"name": "Requirements Example",
"models": [
{
"name": "ModelName",
"generator": "random(vertex_coverage(100))",
"startElementId": "v0",
"vertices": [
{
"id": "v0",
"name": "v_start"
},
{
"id": "v1",
"name": "v_browser_stopped"
},
{
"id": "v2",
"name": "v_browser_started",
"properties": {
"color": "#FEC606"
}
},
{
"id": "v3",
"name": "v_base_URL",
"requirements": [
"UC01 2.2.1"
],
"properties": {
"color": "#8E44AD"
}
},
{
"id": "v4",
"name": "v_search_result",
"requirements": [
"UC01 2.2.2"
],
"properties": {
"color": "#8E44AD"
}
},
{
"id": "v5",
"name": "v_book_information",
"requirements": [
"UC01 2.2.3"
],
"properties": {
"color": "#8E44AD"
}
},
{
"id": "v6",
"name": "v_other_bought_books"
},
{
"id": "v7",
"name": "v_shopping_cart",
"requirements": [
"UC01 2.3"
],
"properties": {
"color": "#8E44AD"
}
}
],
"edges": [
{
"id": "e0",
"name": "e_init",
"sourceVertexId": "v0",
"targetVertexId": "v1",
"actions": [
"numberOfBooks = 0;",
"maxNumberOfBooks = 5;"
]
},
{
"id": "e1",
"name": "e_enter_base_URL",
"sourceVertexId": "v2",
"targetVertexId": "v3"
},
{
"id": "e2",
"name": "e_search_book",
"sourceVertexId": "v3",
"targetVertexId": "v4"
},
{
"id": "e3",
"name": "e_start_browser",
"sourceVertexId": "v1",
"targetVertexId": "v2"
},
{
"id": "e4",
"name": "e_click_book",
"sourceVertexId": "v4",
"targetVertexId": "v5"
},
{
"id": "e5",
"name": "e_add_book_to_cart",
"sourceVertexId": "v5",
"targetVertexId": "v6",
"guard": "numberOfBooks <= maxNumberOfBooks",
"actions": [
"numberOfBooks++;"
]
},
{
"id": "e6",
"name": "e_shopping_cart",
"sourceVertexId": "v6",
"targetVertexId": "v7"
},
{
"id": "e7",
"name": "e_shopping_cart",
"sourceVertexId": "v4",
"targetVertexId": "v7"
},
{
"id": "e8",
"name": "e_shopping_cart",
"sourceVertexId": "v5",
"targetVertexId": "v7"
},
{
"id": "e9",
"name": "e_search_book",
"sourceVertexId": "v7",
"targetVertexId": "v4"
},
{
"id": "e10",
"name": "e_search_book",
"sourceVertexId": "v6",
"targetVertexId": "v4"
},
{
"id": "e11",
"name": "e_search_book",
"sourceVertexId": "v5",
"targetVertexId": "v4"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment