An automated carpark (parking garage) control system.
Requirements for the system are expressed in a document within this repository.
This is Open Source Software (OSS) licensed under Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0).
Documentation is licensed under Creative Commons (https://creativecommons.org/).
The following configurations exist:
- Interactive Testing. Explicitly models interacting entities in a modeled test bench, enabling testing with Verifier and Ciera-generated code using
pom-testbench.xml. Note that the name dates to when individual test functions were invoked manually; a state machine-driven test bucket now automates test case execution. - Automated Testing. Intended for regression testing with both Verifier and generated code, this configuration employs a modeled test suite covering many use cases. Use
pom-autotest.xmlfor this one. - Browser-based Clients. Leverages browser-based clients representing system peripherals such as entry and exit stands, payment machines, and an operator console. Intended for testing and demonstration of code generated from the xtUML model of the carpark control system connected to externally produced code. Use
pom-clients.xmlfor this configuration.
Note: the Interactive Testing test bench, an earlier creation, uses 'concrete' models of the entities which interact with the control system - the entry/exit stands, a patron, etc. Automated testing, a later effort, adopts a more abstract approach with a test bench that models interactions with the control system and uses an application-independent test framework for test case sequencing.
Instructions for populating a workspace for each configuration are provided below. In all cases, the "CarPark" project referred to below is the xtUML project by that name, not the top-level directory which happens to have the same name. The import wizard lists each project in the repository as "CarPark/<projectName>", so the "CarPark" project referred to below is shown as "CarPark/CarPark".
The built-in external entities provided by BridgePoint 7 (or later) can be added to a workspace as follows:
- Create an xtUML project named BuiltInEEs.
- Add a package named EEs to the BuiltInEEs project.
- Select the EEs folder and select the context menu entry (right-click) for "Add Built-in External Entities".
- Add the built-in external entities provided by BridgePoint 7 or later.
- Import the following projects from this repository:
- CarPark
- InteractiveTesting
- Add the built-in external entities provided by BridgePoint 7 or later.
- Import the TestFramework project from the TestFramework repository.
- Import the following projects from this repository:
- CarPark
- CarParkTestbench
- Add the built-in external entities provided by BridgePoint 7 or later.
- Import the following projects from this repository:
- CarPark
- Deployment
- Intercom
- TestControl
As part of creating a debug configuration, the specific configuration of the application to be executed must be specified. This is accomplished by selecting a package containing a collection of component references connected through ports.
- Create a debug configuration of type "xtUML eXecute Application" and name it Carpark-InteractiveTest
- Enable "Log model execution activity"
- Disable "Run deterministically"
- Disable "Enable simulated time"
- Select the InteractiveTesting configuration package within the InteractiveTesting xtUML project
- Run Verifier using this debug configuration
- Execute either of the RunXxx operations defined on the NominalBucket in TestCases_Nominal package.
- Create a debug configuration of type "xtUML eXecute Application" and name it Carpark-AutoTest
- Enable "Log model execution activity"
- Disable "Run deterministically"
- Disable "Enable simulated time"
- Select the AutoTest configuration package within the CarParkTestbench xtUML project
- Run Verifier using this debug configuration
- Execute any one of the functions found in TestFunctions package.
Note that it is not necessary to invoke BridgePoint or import projects into a workspace before building with Ciera. After cloning the relevant repositories, just follow the instructions for building the configuration of interest. In addition to this repository, the TestFramework repository. must also be cloned to build and run the automated testing configuration.
Within the top-level (git repo) directory:
- Select the interactive testbench configuration by issuing the command
cp pom-testbench.xml pom.xml. - Execute
mvn clean install. - Execute
bash ./run-test-servlet.sh. - Verify "bucket successful" appears in console log.
Within the top-level (git repo) directory:
- Select the automated testbench configuration by issuing the command
cp pom-autotest.xml pom.xml. - Execute
mvn clean install. - Execute
bash ./run-autotest-servlet.sh. - Verify that 3 test cases have passed in the summary report in the console log.
Within the top-level (git repo) directory:
- Select the browser-based client configuration by issuing the command
cp pom-clients.xml pom.xml. - Execute
mvn clean install. - Execute
bash ./run-clients-servlet.sh. - Verify a transition in the console log indicating the Carpark is operating.
- Open at least one of each type of client in a browser: localhost:8080/clientType.html where clientType is one of TestControl, OperatorConsole, EntryStand, ExitStand, PaymentMachine.
- The current version of the application contains a fee schedule supporting a single day, April 1, 2025. Use the TestControl client to set the current date and time (as seen by the application) to something between 6:00 a.m. and 6:00 p.m. on this day.
- Use the clients to execute and observe use cases. For example, you might use the entry stand to put a car into the carpark, then use the test control to advance time (simulating a stay of a specified duration), then use the payment machine to pay for the stay, then use the test control to advance time again (simulating the time elapsed between paying for the stay and exiting the carpark), and finally use the exit stand to make the vehicle exit the carpark.
Please open issues for defects and feature requests within the GitHub issues database for this repository.
To contribute enhancements or defect resolutions, please follow this simple process:
- Open an issue. Each issue should cover a single defect or enhancement.
- On your personal fork of the repository, create a branch named _ and make the changes on this branch.
- Test your changes on all configurations.
- Issue a pull request for your branch.