Re: [Sikuli-driver] [Question #707102]: How to append saved screenshot to htmltestrunner report
Question #707102 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/707102 aserty proposed the following answer: To be frankly, there are few casinos that provide great bonuses. If you don't want to waste your time on useless research just visit Awintura casino casino and grab your bonuses.If you've been searching for the best casino it's a sign that you've https://casinoavintura.com/ found it. -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #707102]: How to append saved screenshot to htmltestrunner report
Question #707102 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/707102 RaiMan proposed the following answer: You have to specify a directory, where the screenshots are to be stored (automatically taken inside). myrunner = HTMLTestRunner.HTMLTestRunner(stream=outfile, title='', description ='' , dirTestScreenshots='someFolder') Only with this parameter given, the feature is switched on. -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #707102]: How to append saved screenshot to htmltestrunner report
Question #707102 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/707102 Status: Expired => Answered RaiMan changed the question status: Still under investigation -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #707102]: How to append saved screenshot to htmltestrunner report
Question #707102 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/707102 Status: Open => Expired Launchpad Janitor expired the question: This question was expired because it remained in the 'Open' state without activity for the last 15 days. -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #707102]: How to append saved screenshot to htmltestrunner report
Question #707102 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/707102 JP gave more information on the question: I have amended my code like this but still doesn't seem to append any screenshot on failed test case with the HTMLTestRunner: #from sikuli import * import sys import HTMLTestRunner import unittest class ReturnToHome(unittest.TestCase): def setUp(self): click(Images.chrome) wait(5) def test_aReturnToHome(self): click(Location(300, 247)) wait(3) if exists(Images.xl): #it will fail becuase is not present assert True, "Image found" else: assert False, "Image not found" def tearDown(self): print 'Test Failed' suite = unittest.TestLoader().loadTestsFromTestCase(ReturnToHome) outfile = open('C:\jenkins\workspace\ReturnToHome\TestReport.html', 'w') myrunner = HTMLTestRunner.HTMLTestRunner(stream=outfile, title='Return to Home', description ='' ) myrunner.run(suite) I'm using the HTMLTesteRunner located in the AppData folder and it is the version modified by Raiman. Does anyone have any idea why is not appending the screenshot? Thank you -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Question #707102]: How to append saved screenshot to htmltestrunner report
New question #707102 on SikuliX: https://answers.launchpad.net/sikuli/+question/707102 Hi, I have a working htmltestrunner report I want to find out how do I display the screenshot I saved on a failed test? I think I am using the htmltestrunner with the screenshot for failed tests but when I run my code it doesn't seem to display the screenshot on the report. Here is the code from the htmltestrunner: def addFailure(self, test, err): self.failure_count += 1 TestResult.addFailure(self, test, err) _, _exc_str = self.failures[-1] output = self.complete_output() self.result.append((1, test, output, _exc_str, self.generateTestScreenshot(test))) # modified by RaiMan if self.verbosity > 1: sys.stderr.write('F ') sys.stderr.write(str(test)) sys.stderr.write('\n') else: sys.stderr.write('F') My script: from sikuli import * import sys import HTMLTestRunner import unittest import shutil class ReturnToHomePage(unittest.TestCase): def testA_ReturnHome(self): click(Location(300, 247)) wait(3) click(Location(425, 489)) wait(5) click(Location(92, 326)) wait(3) screenshotsDir = "C:/Sikuli/ReturnHome.sikuli" img = capture(Region(3,5,1021,760)) shutil.move(img, os.path.join(screenshotsDir, "1.png")) assert exists(Images.homePage) suite = unittest.TestLoader().loadTestsFromTestCase(ReturnToHomePage) outfile = open('C:\jenkins\workspace\UAT\TestReport.html', 'w') myrunner = HTMLTestRunner.HTMLTestRunner(stream=outfile, title='', description ='' ) myrunner.run(suite) -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp