More details in report.html

40 views
Skip to first unread message

aa68...@gmail.com

unread,
Aug 28, 2014, 6:22:29 AM8/28/14
to wtfra...@googlegroups.com

Hi David,

In runtest.py , I have modified the test report from xml to HTML and installed nose to make the report in html format.
Now the report generated , i have to put more details like logs if fail or if possible insert screenshots in report, Would it be possible?

Or can you provide me some examples of testwatcher

class wtframework.wtf.testobjects.test_watchers.TestWatcher

Also what If I have to connect to my oracle DB using wtf and execute query?

Code changed in runtest.py
=============================

if options.result_file:
result_path = options.result_file
else:
result_path = os.path.join("reports", "results.html")
test_path = os.path.join("tests", "tests") #+ os.pathsep
os.system("nosetests-2.7 {test_path} --with-html --html-file={result_path}" .format(result_path=result_path, test_path=test_path))

presco...@gmail.com

unread,
Sep 2, 2014, 8:33:54 AM9/2/14
to wtfra...@googlegroups.com
This is just a response to the DB portion of the question. You should take a look at the python library: pyodbc (https://code.google.com/p/pyodbc/). This is what I've been using to make arbitrary sql calls as well as call stored procedures. Also there is a decent amount of documentation and Q/A online.

Hope that helps,
Nick

David Lai

unread,
Sep 2, 2014, 11:36:40 PM9/2/14
to wtfra...@googlegroups.com
For test watchers, an example you can use is the ScreenCapture test watcher that captures screenshots on test failures.


To use test watchers, an easy way is to put it into your test's constructor, or you can create a BaseTest like what the WTFBaseTest does,

Reply all
Reply to author
Forward
0 new messages