From dd53db9a5ffae2f71b89bc8d9d82f64104384541 Mon Sep 17 00:00:00 2001 From: lanqinglong Date: Fri, 9 Oct 2015 21:19:49 +0800 Subject: Use new client script to run onos test JIRA:FUNCTEST-61 Add client.py modify some scripts Change-Id: Icc562ec5211dfea664f89086d259cc7fc011e3a4 Signed-off-by: lanqinglong --- .../Controllers/ONOS/Teston/CI/adapters/client.py | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 testcases/Controllers/ONOS/Teston/CI/adapters/client.py (limited to 'testcases/Controllers/ONOS/Teston/CI/adapters/client.py') diff --git a/testcases/Controllers/ONOS/Teston/CI/adapters/client.py b/testcases/Controllers/ONOS/Teston/CI/adapters/client.py new file mode 100644 index 000000000..25adcbe08 --- /dev/null +++ b/testcases/Controllers/ONOS/Teston/CI/adapters/client.py @@ -0,0 +1,35 @@ +""" +Description: + This file is used to run testcase + lanqinglong@huawei.com +""" +from environment import environment + +class client( environment ): + + def __init__( self ): + environment.__init__( self ) + self.loginfo = environment() + + def RunScript( self, testname ): + """ + Run ONOS Test Script + Parameters: + testname: ONOS Testcase Name + masterusername: The server username of running ONOS + masterpassword: The server password of running ONOS + """ + self.ChangeTestCasePara( testname, self.masterusername, self.masterpassword ) + runtest = "OnosSystemTest/TestON/bin/cli.py run " + testname + os.system(runtest) + print "Done!" + + def onosbasic(self): + #This is the compass run machine user&pass,you need to modify + + print "Test Begin....." + self.OnosConnectionSet() + masterhandle = self.SSHlogin(self.localhost, self.masterusername, + self.masterpassword) + self.OnosEnvSetup( masterhandle ) + self.SSHRelease( masterhandle ) \ No newline at end of file -- cgit 1.2.3-korg