summaryrefslogtreecommitdiff
path: root/test/script/README
blob: a98c653fe67207137a363395160094f28eedbdf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Release date of the file: 07-11-2014 
Status: to be completed

This test bench requires Python version >= 3.4 and uses pygame.

How to get pygame (for Ubuntu 14.04 LTS)
(extract of http://www.pygame.org/wiki/CompileUbuntu)
#install dependencies
sudo apt-get install mercurial python3-dev python3-numpy libav-tools \
    libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \
    libsdl1.2-dev  libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev
 
# Grab source
hg clone https://bitbucket.org/pygame/pygame
 
# Finally build and install
cd pygame
python3 setup.py build

To test:

Launch the application without the logreplayer:
./run -r

Launch the test dashboard (keyboard interface)
(the test dashboard calls the logreplayer and uses test log files)
For Ubuntu 14.04 LTS
python3 simulation-dashboard.py

For Ubuntu 15.10
python simulation-dashboard.py

NB: To launch it remotely, you can set the host address, for instance: python3 simulation-dashboard.py -r 192.168.1.202 

Steps:
'i' launches initialization.log
's' launches start.log
'h' launches high-tank-level.log
'l' launches low-tank-level.log
'x' exits the dashboard (or close the window)

Test scenario:

Before launching the application, assume no ./ambd/ambd process is running (kill -9 if necessary)
Launch the application without the log replayer
./run -r
The main HMI of FSA is displayed
Launch the test panel
python simulation-dashboard.py
The test panel is displayed, with Lat 46.202 Lon 6.147 (Geneva area)

Click on trip computer button
(nothing is activated)
Into the test panel, enter 'i' 
Into the test panel, enter 'h'
Fuel level is 30 l, trip values are displayed after 400 m
Only tank distance is available (no guidance active)

Click on BACK button
Go to enter a destination
Go to enter a destination per address
Click on city button
Enter zuri..
Select Zürich into the list
Click on street button
Enter lamp..
Select In Lampitzäcken into the list
Click on OK button
Click on set as destination
(the GO TO button is activated)
Click on GO TO button
Route is calculated, DISTANCE = 286 km, TIME = 2:39:46
Click on ON button (to activate the guidance)
The map is displayed
To activate the simulation:
Click on Menu button
Click on settings button
(simulation panel)
Click on ON button to start the simulation
Simulation is started
Click on BACK button

Click on trip computer button
Enhanced tank distance is lower than tank distance but > 286 km (route total distance)
Into the test panel, enter 'l' 
Fuel level is 15 l, Enhanced tank distance is lower than  286 km !
Click on BACK button
Click on map
A F is diplayed, click on it
Into the poi menu, click on SEARCH
Select a full station
The info about the station are displayed
Click on REROUTE

Known issues:

ambd process sometimes not killed when the application exits, so check it
./kill_all to kill all the process but still issue with ambd ?
so you need to do kill -9 of the amb process