sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #56473
Re: [Question #694998]: Run all my tests back to back
Question #694998 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/694998
Ali Ahmed gave more information on the question:
Ok so I think its having issue because I'm using HtmlTest report for
these tests. Here is code for LinkTagToTrade, would I need to change it
to run it using Runscript?
import random
import shutil
import os
import utils
reload(utils)
import HTMLTestRunner
import unittest
class UITestCases(unittest.TestCase):
def setUp(self):
utils.openApplication("Adapt2ISO(CI)")
def tearDown(self):
utils.closeApplication()
def test_1(self):
utils.navigateToTradeCapture()
utils.navigateToPowerRTEast()
wait(30)
utils.tradeChangeTradeDate("12/1/2020")
utils.selectTrade()
utils.clickOnLinkTag()
utils.enterDateLinkTag("12/1/2020")
initialTags=utils.getTradeIDInLinkTag()
#takeScreenshot
utils.takeScreenshot("InitialTags")
utils.selectTagLinkTags()
utils.clickLinkTagsInLinkTag()
wait(1)
finalTags=utils.getTradeIDInLinkTag()
finalCount=utils.count_substring(finalTags,initialTags)
print("Final Count is {}".format(finalCount))
#TakeScreenShot
utils.takeScreenshot("AfterTagsAdded")
utils.exitLinkTag()
#utils.selectTrade() First Trade should still be selected
utils.clickOnLinkTag()
tagsLinked=utils.getTradeIDInLinkTag()
actualCount=utils.count_substring(tagsLinked,initialTags)
print("Actual Count is {}".format(actualCount))
if finalCount==actualCount :
print("Tag Linked: Test Pass")
print("Number of Tags that should be Linked {} and actual Tags that are Linked {}".format(finalCount,actualCount))
utils.takeScreenshot("Link_Tags_To_Trade_Test_Results_PASS")
print("See captured images in Result images folder")
assert True
else:
print("Tag not Linked: Test Fail")
print("inital count is {} and actual count is {}".format(initialTags,actualCount))
utils.takeScreenshot("Link_Tags_To_Trade_Test_Results_FAIL")
print("See captured images in Result images folder")
assert False
utils.clickUnLinkTagLinkTag()
utils.exitLinkTag()
suite = unittest.TestLoader().loadTestsFromTestCase(UITestCases)
outfile = open("Link_Tags_To_Trade_Results.html", "w")
runner = HTMLTestRunner.HTMLTestRunner(stream = outfile, title = 'Link Tags to Trade testreport', description = 'NEW').run(suite)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.