Commit 640a95fa authored by Yann Garcia's avatar Yann Garcia
Browse files

Enhance MCF viewer

parent c9f48230
Loading
Loading
Loading
Loading
+8 −8
Changes for etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_: 8 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -25,8 +25,8 @@ LocationAPI_Pixits.PX_ACCESS_POINT_ID := "4g-macro-cell-6"
LocationAPI_Pixits.PX_AP_COORD_LAT             := 43.737087
LocationAPI_Pixits.PX_AP_COORD_LONG            := 7.421007
LocationAPI_Pixits.PX_CONNECTION_TYPE          := LTE
LocationAPI_Pixits.PX_USER                     := "10.10.0.1"
LocationAPI_Pixits.PX_USER_2                   := "10.100.0.1"
LocationAPI_Pixits.PX_USER                     := "10.100.0.1"
LocationAPI_Pixits.PX_USER_2                   := "10.10.0.1"
LocationAPI_Pixits.PX_IP_ADDRESS               := "10.1.0.1"
LocationAPI_Pixits.PX_IP_ADDRESS_1             := "10.100.0.1"
LocationAPI_Pixits.PX_ZONE_ID_1                := "zone01"
@@ -47,10 +47,10 @@ LocationAPI_Pixits.PX_UE_COORD_LONG := 7.421802
# you want to log into the file or display on console (standard error).

LogFile := "../logs/AtsMec_Location/%e.%h-%r.%s"
FileMask := LOG_ALL | USER | DEBUG | MATCHING
ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
#FileMask := LOG_ALL | USER | DEBUG | MATCHING
#ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
LogSourceInfo := Stack
LogEntityName:= Yes
LogEventTypes:= Yes
@@ -108,7 +108,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec013)/TCP(debug=1
# Check that the IUT acknowledges the creation of UE area subscription request when commanded by a MEC Application
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01
# Check that the IUT acknowledges the creation of UE area subscription request when commanded by a MEC Application
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02
AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_BR
# Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application
@@ -198,7 +198,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec013)/TCP(debug=1
# Check that the IUT acknowledges a request to modify a not existing subscription by a MEC Application
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02
# Check that the IUT provides a test notification when requested by a MEC Application
AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETESTNOT_001_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETESTNOT_001_OK
# Check that the IUT responds with a list zones when queried by a MEC Application
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEZONELOOK_001_OK
# Check that the IUT responds with the subscription when queried by a MEC Application - Zone location Event
+56
Changes for plantuml/README.md: 56 added lines, 0 removed lines.
Original line number Diff line number Diff line
# PlantUML Sequence Diagram Generator

## Introduction

This folder converts a merged TITAN/TTCN-3 execution log into a PlantUML sequence diagram (SVG), and includes a small Flask web server to browse the generated diagrams with working hyperlinks to the exchanged TTCN-3 messages.

## Generating a diagram

Diagrams are generated by `scripts/generate_png.sh`, which requires the `ATS` environment variable to be set to the Abstract Test Suite name:

```sh
$ export ATS=OneM2M_Testcases_CSE_Release_3
$ ./scripts/generate_png.sh
```

The ATS's merged log is parsed for every test case it contains (a `TESTCASE ... started` line), and each one produces its own diagram, named after that test case rather than the ATS. For a test case named e.g. `TC_CSE_SUB_NTF_002`, this produces, in this `plantuml/` folder:
- `TC_CSE_SUB_NTF_002.txt`: the generated PlantUML source
- `TC_CSE_SUB_NTF_002.svg`: the rendered sequence diagram
- `TC_CSE_SUB_NTF_002/`: a folder named after the diagram, holding the request/response bodies too long to be shown inline (linked from the diagram's notes)

A log containing several test cases yields one such triplet per test case. Re-running the script regenerates only the test cases present in that run's log -- diagrams and message folders from other test cases are left untouched.

## webserver: browsing the generated diagrams

`webserver/` is a small Flask application that lists every `*.svg` diagram found in this folder and displays a selected one with its hyperlinks kept clickable. Opening an SVG directly (via an image previewer/thumbnail, or over `file://` from a remote machine) does not reliably preserve those links; serving it over HTTP and embedding it via `<object>` does.

### Installation

```sh
$ cd plantuml/webserver
$ pip install -r requirements.txt
```

### Running it

```sh
$ python3 app.py [--host HOST] [--port PORT] [--debug]
```

- `--host` (default: `0.0.0.0`): interface to bind to; the default accepts connections from any interface, not just localhost
- `--port` (default: `5000`)
- `--debug`: enables Flask's auto-reload/debug mode

Then open `http://<host>:<port>/` in a browser:
- The landing page lists every diagram found in `plantuml/`, most recently generated first
- Selecting one opens it embedded in the page with clickable notes; clicking a note displays the corresponding TTCN-3 request/response body, reformatted and indented for readability

### Working remotely (e.g. Cursor / VS Code Remote-SSH)

If the diagrams are generated on a remote machine and you're working from a local editor connected over SSH, start the server on the remote host as above, then forward its port to your local machine -- Remote-SSH editors typically detect and offer to forward a listening port automatically (look for a "Ports" panel), or forward it manually with:

```sh
$ ssh -L 5000:localhost:5000 <user>@<remote-host>
```

Then open `http://localhost:5000/` in a browser on your local machine. This avoids the local-file security restrictions that keep hyperlinks from working when an SVG is opened directly (`file://`) from a path that only exists on the remote host.
+397 −41

File changed.

Preview size limit exceeded, changes collapsed.

+209 −22

File changed.

Preview size limit exceeded, changes collapsed.

+9.89 KiB

File added.

No diff preview for this file type.

Loading