htmltestrunner output required for my program

Asked by Ravikiran

I'm reading from database and comparing values with current data. Values are stored in dictionaries. The problem is :
below code is working fine for test_map with for loop. But when i tried changing it with my requirement its not giving any
output on result.html.

In the below code i just assigned values for mastdict and curdict for the first level execution.

Am i missing anything ?? or htmltestrunner wont support for defined functions outputs ?

import unittest
import HTMLTestRunner
import Automod

class FWDSizingCustomworkload(unittest.TestCase):
        longMessage = True

def make_method(name, a, b):
        def _method(self, a=a, b=b):
                self.assertEqual(a, b, name)
        return _method

def main():
        tests_map = {
                'foo': [1, 1],
                'bar': [1, 2],
                'baz': [5, 5]
        }
        #(masdict,curdict)=Automod.readDB()
        masdict=1
        curdict=1
        #for name, params in tests_map.iteritems():
                #test_name = "test_gen_%s" % name
        test_name="RKG"
        _method = make_method(test_name, masdict, curdict)
                #_method = make_method(test_name, params[0], params[1])
        setattr(FWDSizingCustomworkload, test_name, _method)
        suite = unittest.TestLoader().loadTestsFromTestCase(FWDSizingCustomworkload)
        unittest.TextTestRunner(verbosity=2)
        with open('results.html', 'w') as html_file:
                runner = HTMLTestRunner.HTMLTestRunner(stream=html_file,
                                               title='demo title',
                                               description='demo descr')
                runner.run(suite)

if __name__ == '__main__':
        main()

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Karl (k-d) said :
#1

Your result.html is put in your sikuli installation directory (i.e. it is in the same directory as sikulix.jar).

Can you help with this problem?

Provide an answer of your own, or ask Ravikiran for more information if necessary.

To post a message you must log in.