Re: Testdoc Enhancement Suite

229 views
Skip to first unread message

Raphael Castaneda

unread,
Feb 15, 2013, 4:16:15 PM2/15/13
to robotframe...@googlegroups.com
Hmm, my screenshot didn't seem to work.

Pekka Klärck

unread,
Feb 19, 2013, 3:47:44 AM2/19/13
to raphael....@gmail.com, robotframe...@googlegroups.com
2013/2/15 Raphael Castaneda <raphael....@gmail.com>
>
> I'm not sure how many of you are using testdoc, but I hope you find this
> useful.
>
> My team has been using the output of testdoc to share and review our test
> plan.
> Since we've also been using tags like "implemented", our manager has been
> using testdoc to keep track of our progress.
>
> I developed this script to make testdoc's output a little eaiser to read,
> as well as add some functionality to the test tags on the page.

I tested the script and the result was really nice. I liked both the
enhanced styles and the possibility to filter tests based on tags. It
would be great to get at least some of these enhancements into
Testdoc, and possibly also to the normal log files, either as standard
features or some kind of optional plugins. Below are few
comments/ideas related to this. Let me know what you think.

1) You could already now create a separate project that contains these
enhancements as a plugin. Modifying the generated documentation is a
bit hacky but works.

2) We could implement a feature to log/report/Testdoc/Libdoc that
allows injecting custom content to the generated files. This would
make it possible to add your styles and javascript into Testdoc
results without modifying the generated file with a separate script.
The functionality could obviously also be used for other purposes,
such as adding custom styles, company logos, whatever, to normal
reports and log files. To make this really flexible, we probably
should allow injecting content both to the document head and to the
body. The usage could be something like this:

python -m robot.testdoc --inject head:styles.css --inject
head:javascript.js --inject body:content.html path/to/testdata

3) We could simply add these enhancements into the standard Testdoc.
If you are interested on that, it would be great if you could submit
separate issues about different enhancements to the issue tracker.
That way it would be easier to review both merits of individual
enhancements and also the code related to them.


I also have some bad news for you: I have recently tuned logs,
reports, and also Testdoc results quite a bit, and the current code
isn't anymore compatible with your enhancements. There has been both
some changes to the structure of these files (for example, the +/-
button is nowadays just a background image) and also to element
identifiers have changed (switched to use names-with-hyphens-style
consistently). It is unfortunate that these changes break your code in
a minor release (they are included into the forthcoming 2.7.7), but I
didn't know anyone has code dependent on these APIs. I promise to be
more careful with such changes in the future.

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

Raphael Castaneda

unread,
Feb 20, 2013, 10:58:42 AM2/20/13
to robotframe...@googlegroups.com, raphael....@gmail.com
Pekka,

I think I prefer option 3, as it would provide the most benefit for everyone. I like the idea of having these enhancements on the standard Testdoc, and perhaps even the Log/Report as well.
I'll go ahead and submit these enhancements to the bug tracker.
Thanks for taking a look at this, and thanks for the waning about 2.7.7.

Regards,

Raphael

Pekka Klärck

unread,
Feb 21, 2013, 4:45:06 AM2/21/13
to raphael....@gmail.com, robotframe...@googlegroups.com
2013/2/20 Raphael Castaneda <raphael....@gmail.com>:
>
> I think I prefer option 3, as it would provide the most benefit for
> everyone. I like the idea of having these enhancements on the standard
> Testdoc, and perhaps even the Log/Report as well.
> I'll go ahead and submit these enhancements to the bug tracker.

Great! Adding better styles to Testdoc could be done even for RF
2.7.7. Adding new functionality is more work and also requires more
testing with different browsers. Somehow being able to view tests with
certain tags would be a great feature also in log so I would like to
see it implemented in a way that can be easily shared. The problem is
that the Javascript model used in Testdoc and in normal log are
different. I'm willing to help with this but I doubt we can get it
into 2.7.7 anyway.

> Thanks for taking a look at this, and thanks for the waning about 2.7.7.

Thank you for the great enhancements. Hopefully updating your code to
work with 2.7.7 isn't too much work. As you probably have noticed,
there is a preview release now available at http://bit.ly/RobotPreview
that you can easily use to test your changes. I also promise to avoid
making changes affecting Testdoc before the final release.
Reply all
Reply to author
Forward
0 new messages