← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #227195]: Tests are being run twice using Jython unittest Eclipse

 

Question #227195 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/227195

    Status: Needs information => Open

Bunnings gave more information on the question:
This is a sample test I have written by splitting a sequence of actions into 3 test methods. 
I am using CTRL+F11 to run the tests. 

import unittest
import HTMLTestRunner
from sikuli import *
from Testdata import Data

class MyUnitTest(unittest.TestCase):
              
    def setUp(self):
        setBundlePath("D:\\Code\\Sikuli Scripts\\PoC.sikuli\\Images")
        
    def test_1launchinternetexplorer(self):
        App.open("C:\Program Files\Internet Explorer\iexplore.exe")
        App.focus("Internet Explorer")
        wait("httpmys0urce.png")
        click("httpmys0urce.png")
        type(Data().GetData("URL"))
        type(Key.ENTER)
        wait("DEV.png", 50)
        
    def test_2logintoFlight(self):
        obj = Data()
        type("Username.png", obj.GetData("Username"))
        type("Password.png", obj.GetData("Password"))
        click("1365382982391.png")
        exists("Applications.png")
        
    def test_3NavigatetoDomestic(self):
        click("DEW.png")
        exists("MainDEV3.png")
		
suite = unittest.TestLoader().loadTestsFromTestCase(MyUnitTest)
resultfile = open("D://code/result.html","w")
runner = HTMLTestRunner.HTMLTestRunner(stream = resultfile, title = "Test Report", description = "Flight Center Automation")
runner.run(suite)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.