← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #242649]: Take Screenshot for pass case also

 

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

    Status: Answered => Open

Lakshmi is still having a problem:
Hi,
I have modified HTMLTestRunner.py as you said.,

  def addSuccess(self, test):
        self.success_count += 1
        TestResult.addSuccess(self, test)
        output = self.complete_output()
        self.result.append((0, test, output, '',self.generateTestScreenshot(test)))
        #self.result.append((0, test, output, '',''))
        if self.verbosity > 1:
            sys.stderr.write('ok ')
            sys.stderr.write(str(test))
            sys.stderr.write('\n')
        else:
            sys.stderr.write('.')

    def addError(self, test, err):
        self.error_count += 1
        TestResult.addError(self, test, err)
        _, _exc_str = self.errors[-1]
        output = self.complete_output()
        #self.result.append((2, test, output, _exc_str, ''))
        self.result.append((2, test, output, _exc_str,self.generateTestScreenshot(test)))
        if self.verbosity > 1:
            sys.stderr.write('E  ')
            sys.stderr.write(str(test))
            sys.stderr.write('\n')
        else:
            sys.stderr.write('E')

But still I am getting only one screenshot in the report,
I want at each step.
I am running sikuli from eclipse with pydev environment.I need screenshots in eclipse stdout.
I added assert True line , but its not taking all screenshots.
Please post the 'generateTestScreenshot(test)))' code.
Please answer the below questions, which I asked yesterday,

1. Once one 'assert False' statement occured means , will the script exits or will it proceed to next statemet?
2. How many failure images can be taken?


Thanks in advance.

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