Blame view

HOWTO_TEST.txt 3.02 KB
e0bd046a   Etienne Pallier   - Ajouté 2 HOWTO ...
1
2
3
4
5

*************************************************************************************
 Here is how you can TEST that pyros is working well (ensure that nothing is broken)
*************************************************************************************

321c1c7d   Etienne Pallier   updated HOWTO
6
7
8
(More on this subject at https://docs.google.com/document/d/1osHT3d8GiofRd9k3nL7cz4Hcmo9WVEOcSaSSQpgJcFs/edit#heading=h.odcd50f0rjwh)


e0bd046a   Etienne Pallier   - Ajouté 2 HOWTO ...
9
10
(A) Running the unit tests suite:
- (1) Some unit tests only:
c84c9d3b   Etienne Pallier   update doc test e...
11
	$ ./pyros.py test
e0bd046a   Etienne Pallier   - Ajouté 2 HOWTO ...
12
- (2) All unit tests:
c84c9d3b   Etienne Pallier   update doc test e...
13
	$ ./pyros.py testall
e0bd046a   Etienne Pallier   - Ajouté 2 HOWTO ...
14
15

(B) Test with agents:
92a28ec7   Etienne Pallier   LOGGER UNIQUE POU...
16
17
- (1) FULL Test with agentMultiRequester (AgentMajordome like) sending commands to several device agents at once : 
	the Gemini telescope device agent (or simulator), and the SBIG device agent (or simulator):
670b526c   Etienne Pallier   update tests
18
		$ ./pyros.py -ts start agentDeviceGemini,agentDeviceSBIG,agentMultiRequester
92a28ec7   Etienne Pallier   LOGGER UNIQUE POU...
19
		(add "-d" option for debug mode)
670b526c   Etienne Pallier   update tests
20
21
22
23
24
25
- (2) Test against REAL Gemini telescope
		$ ./pyros.py -t start agentDeviceGemini,agentMultiRequester

******
OLD OBSOLETE TESTS:
- Test with agentA and agentB sending commands to each other:
c84c9d3b   Etienne Pallier   update doc test e...
26
	$ ./pyros.py -t start agentA,agentB
670b526c   Etienne Pallier   update tests
27
- Test with agentTelescopeRequester sending commands to the Gemini telescope (or its simulator) :
051e085c   Etienne Pallier   mise à jour des n...
28
	- test with telescope SIMULATOR (use -s option) :
57621753   Etienne Pallier   NOUVELLE ARCHI un...
29
		$ ./pyros.py -ts start agentDeviceGemini,agentTelescopeRequester
051e085c   Etienne Pallier   mise à jour des n...
30
	- test with REAL telescope :
57621753   Etienne Pallier   NOUVELLE ARCHI un...
31
		$ ./pyros.py -t start agentDeviceGemini,agentTelescopeRequester
670b526c   Etienne Pallier   update tests
32
******
4783e5b5   Etienne Pallier   GROS RENOMMAGE de...
33
	 
e0bd046a   Etienne Pallier   - Ajouté 2 HOWTO ...
34
(C) Interactive testing:
c84c9d3b   Etienne Pallier   update doc test e...
35
	$ ./pyros.py shell
321c1c7d   Etienne Pallier   updated HOWTO
36

c84c9d3b   Etienne Pallier   update doc test e...
37
38
39
40
(D) Devices testing:
	$ cd src/devices_controller/
Suivre les instructions du document README.md de ce dossier
 
102bd63f   Etienne Pallier   1er debut de solu...
41

693b8c91   Etienne Pallier   remis l'ancien Lo...
42
43
44
45




102bd63f   Etienne Pallier   1er debut de solu...
46
 
693b8c91   Etienne Pallier   remis l'ancien Lo...
47
48
49
*************************************************************************************************
 Use netstat to see if a simulator is (still) listening and should thus be killed manually
*************************************************************************************************
102bd63f   Etienne Pallier   1er debut de solu...
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
 
$ netstat -tnl | grep 1111
udp4       0      0  127.0.0.1.11112        *.*                               
udp4       0      0  127.0.0.1.11110        *.* 

To see which processus is responsible for this connection, use -v (or -p on linux)
$ netstat -tnlv | grep 1111
udp4       0      0  127.0.0.1.11112        *.*                                786896   9216  24386      0 0x0000 0x00000000
udp4       0      0  127.0.0.1.11110        *.*                                786896   9216   3226      0 0x0000 0x00000000

Here, we see that process 3226 has launched a simulator on port 11110
To see this process detailed :
$ ps -efl|grep 3226
  501  3226     1   0 30sep19 ??         0:41.77 /usr/local/Cella     4046  31  0  4331296    608 -      S                   0
   
Idem for process 24386:
$ ps -efl|grep 24386
  501 24386     1   0  4:04   ttys001    0:01.15 /usr/local/Cella     4046  31  0  4332056  40156 -      S                   0

Information about a specific process:  
$ ps -p 24386
24386 ttys001    0:01.24 /usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python AgentDeviceSBIG.py -t -s

=> Now, we are sure this is the right process to kill