Bump the version for the SO core to Kohn
[so.git] / so-simulator / README.md
1 SO Citrus REST Simulator ![Logo][1]
2 ================
3
4 This is a standalone simulator application for REST messaging.
5
6 Clients are able to access the simulator endpoints and the simulator responds with predefined response
7 messages according to its scenarios. The simulator response logic is very powerful and enables us to simulate 
8 any kind of server interface.
9
10 Read the simulator [user manual](https://citrusframework.org/citrus-simulator/) for more information.
11
12 Message processing
13 ---------
14
15 First of all the simulator identifies the simulator scenario based on a mapping key that is extracted from the incoming request. Based
16 on that operation key the respective simulator scenario is executed.
17
18 There are multiple ways to identify the simulator scenario from incoming request messages:
19
20 * Message-Type: Each request message type (XML root QName) results in a separate simulator scenario
21 * REST request mappings: Identifies the scenario based on Http method and resource path on server
22 * SOAP Action: Each SOAP action value defines a simulator scenario
23 * Message Header: Any SOAP or Http message header value specifies a new simulator scenario
24 * XPath payload: An XPath expression is evaluated on the message payload to identify the scenario
25
26 Once the simulator scenario is identified the respective test logic builder is executed. The Citrus test logic provides
27 proper response messages as a result to the calling client. The response messages can hold dynamic values and the
28 simulator is able to perform complex response generating logic. The test logic is built in Java classes that use the Citrus test
29 DSL for defining the simulator scenario steps.
30
31 Quick start
32 ---------
33
34 You can build the simulator application locally with Maven:
35
36 ```
37 mvn clean install
38 ```
39
40 This will compile and package all resources for you. Also some prepared Citrus integration tests are executed during the build. 
41 After the successful build you are able to run the simulator with:
42
43 ```
44 mvn spring-boot:run
45 ```
46
47 Open your browser and point to [http://localhost:8080](http://localhost:8080). You will see the simulator user interface with all available scenarios and 
48 latest activities. 
49
50 You can execute the Citrus integration tests now in order to get some interaction with the simulator. Open the Maven project in your favorite IDE and
51 run the tests with TestNG plugins. You should see the tests calling operations on the simulator in order to receive proper responses. The simulator user interface should track those
52 interactions accordingly.
53
54 Information
55 ---------
56
57 Read the [user manual](https://citrusframework.org/citrus-simulator/) for detailed instructions and features.
58 For more information on Citrus see [citrusframework.org][2], including a complete [reference manual][3].
59
60  [1]: https://citrusframework.org/img/brand-logo.png "Citrus"
61  [2]: https://citrusframework.org
62  [3]: https://citrusframework.org/reference/html/