Example #1
0
def main():
    if len(sys.argv[1:]) < 1:
        sys.exit("Usage: %s <filename>" % sys.argv[0])
    testcase = sys.argv[1]

    BASE_DIR = os.path.normpath(os.path.dirname(__file__))
    SCRIPT_DIR = os.path.normpath(os.path.join(BASE_DIR, "script"))
    WORK_DIR = os.path.normpath(os.path.join(BASE_DIR, "workspace"))

    if os.path.exists(WORK_DIR):
        import shutil
        shutil.rmtree(WORK_DIR)

    workspace = Workspace(WORK_DIR)
    TMP_DIR = workspace.mkdir("tmp")
    LOG_DIR = workspace.mkdir("log")
    REPORT_DIR = workspace.mkdir("report")

    L = Log("Sample.STVE")
    StveTestCase.set("system.tmp", TMP_DIR)
    StveTestCase.set("system.log", LOG_DIR)

    runner = StveTestRunner()
    runner.execute(testcase, SCRIPT_DIR)
Example #2
0
 def test_library_execute_picture_success_04(self):
     StveTestCase.set("browser.url", "https:\/\/www.google.co.jp")
     self.base_library_execute_success("library_browser_04.py")
Example #3
0
 def test_library_execute_picture_success_04(self):
     StveTestCase.set("browser.url", "https:\/\/www.google.co.jp")
     self.base_library_execute_success("library_browser_04.py")
Example #4
0
 def test_library_execute_picture_success_12(self):
     StveTestCase.set("system.tmp", self.tmp_path)
     self.base_library_execute_success("library_picture_12.py")
Example #5
0
 def test_library_execute_picture_success_08(self):
     StveTestCase.set("system.tmp", self.tmp_path)
     self.base_library_execute_success("library_picture_08.py")
     self.workspace.rm(os.path.join(self.tmp_path, "test02.png"))
Example #6
0
 def test_library_execute_picture_success_12(self):
     StveTestCase.set("system.tmp", self.tmp_path)
     self.base_library_execute_success("library_picture_12.py")
Example #7
0
 def test_library_execute_picture_success_08(self):
     StveTestCase.set("system.tmp", self.tmp_path)
     self.base_library_execute_success("library_picture_08.py")
     self.workspace.rm(os.path.join(self.tmp_path, "test02.png"))
Example #8
0
 def test_library_execute_picture_success_04(self):
     StveTestCase.set("android.serial", "emulator-5554")
     self.base_library_execute_success("library_android_04.py")