{"id":24265010,"url":"https://github.com/michalredm/scenarioqualitychecker","last_synced_at":"2025-10-08T01:03:04.192Z","repository":{"id":240513046,"uuid":"793399161","full_name":"MichalRedm/ScenarioQualityChecker","owner":"MichalRedm","description":"Repository for Software Engineering project at Poznań University of Technology.","archived":false,"fork":false,"pushed_at":"2024-06-10T05:49:27.000Z","size":1176,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T10:34:12.587Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MichalRedm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-29T06:39:14.000Z","updated_at":"2024-06-10T05:48:59.000Z","dependencies_parsed_at":"2024-06-07T22:25:00.704Z","dependency_job_id":"e436d641-8bd1-49b3-b257-df80c0de2bfd","html_url":"https://github.com/MichalRedm/ScenarioQualityChecker","commit_stats":null,"previous_names":["michalredm/scenarioqualitychecker"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichalRedm%2FScenarioQualityChecker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichalRedm%2FScenarioQualityChecker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichalRedm%2FScenarioQualityChecker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichalRedm%2FScenarioQualityChecker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MichalRedm","download_url":"https://codeload.github.com/MichalRedm/ScenarioQualityChecker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241944009,"owners_count":20046660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-15T09:56:10.310Z","updated_at":"2025-10-08T01:03:04.186Z","avatar_url":"https://github.com/MichalRedm.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScenarioQualityChecker\n\n[![Java CI with Maven](https://github.com/MichalRedm/ScenarioQualityChecker/actions/workflows/maven.yml/badge.svg)](https://github.com/MichalRedm/ScenarioQualityChecker/actions/workflows/maven.yml)\n[![Javadoc](https://img.shields.io/badge/JavaDoc-Online-green)](https://MichalRedm.github.io/ScenarioQualityChecker/javadoc/)\n[\u003cimg src=\"https://run.pstmn.io/button.svg\" alt=\"Run In Postman\" style=\"width: 128px; height: 32px;\"\u003e](https://app.getpostman.com/run-collection/23212826-bddb4048-399e-4562-81ee-76f6adc5e77e?action=collection%2Ffork\u0026source=rip_markdown\u0026collection-url=entityId%3D23212826-bddb4048-399e-4562-81ee-76f6adc5e77e%26entityType%3Dcollection%26workspaceId%3D9cf44873-c2dc-491d-952b-e2bb3006bedf)\n\n## Description of the project\n\nFor analysts documenting functional requirements with scenarios, our SQC application provides quantitative information and enables the detection of problems in functional requirements written in the form of scenarios. It is available as a remote API, which allows it to be integrated with existing tools.\n\nFormat of scenarios that will be processed by our application:\n- The scenario includes a header specifying its title and actors (external and system)\n- The scenario consists of steps (each step contains text)\n- Steps can contain sub-scenarios (any level of nesting)\n- The steps may start with the keywords IF, ELSE, FOR EACH\n\nAn example of such a scenario:\n\n```\nTitle: Book addition\nActors: Librarian\nSystem actor: System\n\n* Librarian selects options to add a new book item\n* A form is displayed.\n* Librarian provides the details of the book.\n* IF: Librarian wishes to add copies of the book\n  - Librarian chooses to define instances\n  - System presents defined instances\n  - FOR EACH: instance:\n    * Librarian chooses to add an instance\n    * System prompts to enter the instance details\n    * Librarian enters the instance details and confirms them.\n    * System informs about the correct addition of an instance and presents the updated list of instances.\n* Librarian confirms book addition.\n* System informs about the correct addition of the book.\n```\n\n## Project structure\n\n![UML diagram](https://raw.githubusercontent.com/MichalRedm/ScenarioQualityChecker/main/src/main/resources/logic.png \"UML diagram\")\n\n## Usage\n\nThe application should be run with Java 17; when it is running, the REST API endpoint will be located at port `8080`. The API accepts GET and POST requests. The body of every POST request should be JSON with field `scenario` containing JSON representation of a scenario. An example of a valid POST request body (the scenario here corresponds to an exemplary scenario provided earlier):\n```json\n{\n    \"scenario\": {\n        \"title\": \"Book addition\",\n        \"actors\": [\n            \"Librarian\"\n        ],\n        \"systemActor\": \"System\",\n        \"steps\": [\n            {\n                \"text\": \"Librarian selects options to add a new book item\"\n            },\n            {\n                \"text\": \"A form is displayed.\"\n            },\n            {\n                \"text\": \"Librarian provides the details of the book.\"\n            },\n            {\n                \"type\": \"IF\",\n                \"text\": \"Librarian wishes to add copies of the book\",\n                \"substeps\": [\n                    {\n                        \"text\": \"Librarian chooses to define instances\"\n                    },\n                    {\n                        \"text\": \"System presents defined instances\"\n                    },\n                    {\n                        \"type\": \"FOR_EACH\",\n                        \"text\": \" instance:\",\n                        \"substeps\": [\n                            {\n                                \"text\": \"Librarian chooses to add an instance\"\n                            },\n                            {\n                                \"text\": \"System prompts to enter the instance details\"\n                            },\n                            {\n                                \"text\": \"Librarian enters the instance details and confirms them.\"\n                            },\n                            {\n                                \"text\": \"System informs about the correct addition of an instance and presents the updated list of instances.\"\n                            }\n                        ]\n                    }\n                ]\n            },\n            {\n                \"text\": \"Librarian confirms book addition.\"\n            },\n            {\n                \"text\": \"System informs about the correct addition of the book.\"\n            }\n        ]\n    }\n}\n```\nIf everything goes well, server will respond with success message and save the scenario.\n\nThe GET request should also be a JSON, with field `actions` that should be the list of actions to be performed on the provided scenario by the application. The supported actions are:\n- `countAllSteps` - provides the total number of steps in the scenario (at any level of nesting);\n- `countConditionalDecisions` - counts the total number of all conditional decisions within a scenario;\n- `getInvalidSteps` - provides a list of steps that do not start with an actor or system actor;\n- `toText` - transforms the scenario to a textual format with step numbering;\n- `simplify\u003cdepth\u003e` - provides a simpler version of a scenario, reduced to a certain level of nesting.\n\nAn example o valid GET request body:\n```json\n{\n    \"actions\": [\n        \"countAllSteps\", \n        \"countConditionalDecisions\",\n        \"getInvalidSteps\",\n        \"toText\",\n        \"simplify1\"\n    ]\n}\n```\n\nIf the provided request is correct, the system should return a response in JSON format; it will have the form of a dictionary, in which keys will be the actions and values will be results produced by the application. Example response for the requests provided earlier:\n```json\n{\n  \"countConditionalDecisions\": 2,\n  \"getInvalidSteps\": [\n    {\n      \"text\": \"A form is displayed.\"\n    },\n    {\n      \"type\": \"FOR_EACH\",\n      \"text\": \" instance:\",\n      \"substeps\": [\n        {\n          \"text\": \"Librarian chooses to add an instance\"\n        },\n        {\n          \"text\": \"System prompts to enter the instance details\"\n        },\n        {\n          \"text\": \"Librarian enters the instance details and confirms them.\"\n        },\n        {\n          \"text\": \"System informs about the correct addition of an instance and presents the updated list of instances.\"\n        }\n      ]\n    }\n  ],\n  \"simplify1\": {\n    \"title\": \"Book addition\",\n    \"actors\": [\n      \"Librarian\",\n      \"TestGuy\"\n    ],\n    \"systemActor\": \"System\",\n    \"steps\": [\n      {\n        \"text\": \"Librarian selects options to add a new book item\"\n      },\n      {\n        \"text\": \"A form is displayed.\"\n      },\n      {\n        \"text\": \"Librarian provides the details of the book.\"\n      },\n      {\n        \"type\": \"IF\",\n        \"text\": \"Librarian wishes to add copies of the book\",\n        \"substeps\": []\n      },\n      {\n        \"text\": \"Librarian confirms book addition.\"\n      },\n      {\n        \"text\": \"System informs about the correct addition of the book.\"\n      }\n    ]\n  },\n  \"countAllSteps\": 13,\n  \"toText\": \"Title: Book addition\\nActors: Librarian, TestGuy \\nSystem actor: System\\n\\nSteps:\\n1. Librarian selects options to add a new book item\\n2. A form is displayed.\\n3. Librarian provides the details of the book.\\n4. IF: Librarian wishes to add copies of the book\\n4.1. Librarian chooses to define instances\\n4.2. System presents defined instances\\n4.3. FOR_EACH:  instance:\\n4.3.1. Librarian chooses to add an instance\\n4.3.2. System prompts to enter the instance details\\n4.3.3. Librarian enters the instance details and confirms them.\\n4.3.4. System informs about the correct addition of an instance and presents the updated list of instances.\\n5. Librarian confirms book addition.\\n6. System informs about the correct addition of the book.\\n\"\n}\n```\n\nIf any request is invalid, the system will produce an error `500 Bad Request` and return an error message via the API.\n\n## Additional information\n\n[Here](https://docs.google.com/spreadsheets/d/11QnRBhp2aYy2u0Iwbr8FGHB5VYHG_Fb6) is an Excel spreadsheet containing the Sprint and Product backlog for this project.\n\n\u003c!--\n## Sprint remind:\n\n* We started the sprint on April 29th\n* During the first week we started planning and created basic project structure on github\n* During the second week we started coding rest API\n, created github actions\n* During the third week we added github issues, which were responsible for most functionalities and we completed all project backlog tasks\n\n## Observations:\n\n* We should have more equal distribution of work\n* We should perform more work earlier\n* We should have more live meetings\n\n## Actions to be taken in the next sprint:\n\n* Distribute work at the beginning\n* Plan what should be done in each week at the beginning\n* Meeting once a week\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichalredm%2Fscenarioqualitychecker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichalredm%2Fscenarioqualitychecker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichalredm%2Fscenarioqualitychecker/lists"}