HOWTO_TEST.txt 3.02 KB

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

(More on this subject at https://docs.google.com/document/d/1osHT3d8GiofRd9k3nL7cz4Hcmo9WVEOcSaSSQpgJcFs/edit#heading=h.odcd50f0rjwh)


(A) Running the unit tests suite:
- (1) Some unit tests only:
	$ ./pyros.py test
- (2) All unit tests:
	$ ./pyros.py testall

(B) Test with agents:
- (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):
		$ ./pyros.py -ts start agentDeviceGemini,agentDeviceSBIG,agentMultiRequester
		(add "-d" option for debug mode)
- (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:
	$ ./pyros.py -t start agentA,agentB
- Test with agentTelescopeRequester sending commands to the Gemini telescope (or its simulator) :
	- test with telescope SIMULATOR (use -s option) :
		$ ./pyros.py -ts start agentDeviceGemini,agentTelescopeRequester
	- test with REAL telescope :
		$ ./pyros.py -t start agentDeviceGemini,agentTelescopeRequester
******
	 
(C) Interactive testing:
	$ ./pyros.py shell

(D) Devices testing:
	$ cd src/devices_controller/
Suivre les instructions du document README.md de ce dossier
 





 
*************************************************************************************************
 Use netstat to see if a simulator is (still) listening and should thus be killed manually
*************************************************************************************************
 
$ 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