I'm writing a test software to control a few Agilent Instruments using PyVISA and VISA as well some Agilent IO libraries. I have create a "TesPlan" (testplan.py) that should "call" a few other Phyton test scripts (rf_test.py, rf_test1, rf_test2.py, etc)
At this point, I'm using a "Subprocess to open and execute all my test, however, I haven't fin the way to bring the results of each test into my main testplan.
Please see below my code:
TEST-PLAN (testplan.py)
import visa
import time
import subprocess
##SubTest located at:
test = "C:\\python_rf"
os.chdir(test)
import rf_test
subprocess.Popen(['python', 'rf_test.py'])
print (status)
import rf_test1
subprocess.Popen(['python', 'rf_test1.py'])
print (status)
TEST SCRIPT (rf_test.py)
##Do some RF - GPS Testing
if all is OK
status = "PASS"
TEST SCRIPT (rf_test1.py)
##Do some RF - GPS Testing
if all is OK
status = "PASS"
I need to bring the status from the Sub-Test into my main "Test-Plan" in order to evaluate the status and allow the unit to move to the next test.