Skip to content

xUnit-compatible results #442

Closed
Closed

Description

@spooning

Originally submitted to Google Code by rdesgroppes on 11 Dec 2009

This patch is a first attempt to make RF able to generate an (optional)
xUnit-compatible result file.
A few infos:

  • -u --xunitfile command line option (doc similar to -b --debugfile)
  • low impact on existing code so far
  • no copyright header yet (dunno what to put there)
  • hum... no unit test yet (what? for a xUNIT related stuff?!)
    Régis

Activity

  1. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @pekkaklarck on 12 Dec 2009

    On a fast look the patch looks really good. Apparently the code base is not a total
    mess when you've been able to create a feature needing such end-to-end functionality.
    I don't have time to go through the patch in detail just now, but here are some
    answers for your questions,

    1. For copyrights we need to use the same NSN copyright notice (w/ Apache 2 license)
      as elsewhere in the code base. External tools could be distributed using some other
      license in e.g. in a contrib directory or as a separate project (when the author can
      make all the copyright, license, etc. decisions).

    If you are interested in creating more patches -- which would be awesome because
    they've all been so high value so far -- we actually need to ask you to sign a CLA
    [1]. I really hope that's not a problem for you or your company. Personally I don't
    care too much about licenses or copyrights (as long as they are free) but NSN
    requires as to take care of that. Since they were kind enough to allow open sourcing
    in the first place I think that's pretty fair.

    [1] http://producingoss.com/en/copyright-assignment.html

    1. The xUnit serializer itself could get some unit tests but otherwise I think this
      kind of functionality is easier to test using acceptance tests. For more information
      about the acceptance test system see atest/README.txt and ask questions on the
      rf-devel if there's something unclear.

    In this case I'd probably add a new test suite under the atest/robot/output
    directory and add possibly needed test data under atest/testdata/output. I'd use
    the plain text format because it produces best diffs. I actually think we'll switch
    other tests to that format during RF 2.2 development too.

    The patch is already so good that I'm sure we can get it in. I'll assign it to 2.2
    but we might actually want to still create 2.1.3 to get this and other recent
    features into real use.

  2. added this to the 2.5.5 milestone on Jun 29, 2014
  3. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by rdesgroppes on 14 Dec 2009

    Hi Pekka,
    I've amended the patch so that:
    1- appropriate NSN (C) + Apache 2 license in new file (xunitserializers.py)
    2- no NONE.xml is written by default (oops)
    I'm going to work on remaining todos:

    • acceptance tests.
    • how xunit file should look like when test suites are nested.
      Régis
  4. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by rdesgroppes on 14 Dec 2009

    Another step in better xUnit integration:
    1- Flattened test cases according to the de facto schema, see
    http://marc.info/?l=ant-dev&m=123551933508682. In (at least) Hudson, nested test
    suites now appear as packages (browsable). I've used Python nose approach, see
    http://somethingaboutorange.com/mrl/projects/nose/0.11.1/plugins/xunit.html.
    2- Fixed elapsed time unit (seconds -> milliseconds, rounding at closest second).
    Next step: acceptance tests (CLA signature in progress).

  5. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @pekkaklarck on 14 Dec 2009

    I still don't have time for a full review but here are some fast comments:

    1. Wouldn't it be useful if you could us this option also with rebot? You could
      then, for example, easily generate a combined report with all the information.

    2. The patch had a comment about tracebacks not always being available but I wouldn't
      care about them. We changed the level from INFO to DEBUG ( issue 144 ) because the
      information they contain is mainly relevant for library developers.

    3. Great work!

  6. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @pekkaklarck on 15 Jan 2010

    We are planning to have 2.1.3 release before starting the development of the next
    major RF version. rdesgroppes, are you interested in getting this feature into 2.1.3
    already?

  7. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by rdesgroppes on 17 Jan 2010

    Hi Peke,
    We're already using a locally patched version of RF so, yes, I'd be grateful to come
    back to an official release, as the next 2.1.3.
    Cheers,
    Régis

  8. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @pekkaklarck on 18 Jan 2010

    Ok, let's try to get this into 2.1.3 then. As far as I can tell following things are
    still missing:

    1. Possible fine tuning of the produced file. Or is it fine already?
    2. Support for this option also for rebot
    3. Acceptance tests
    4. Documentation to the user guide

    If you Régis can take care of 1) & 2) first, we can take a look at 3) & 4) together.

  9. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @yanne on 24 Feb 2010

    We are trying to release 2.1.3 already this week and this doesn't seem to be ready

  10. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @jussimalinen on 6 Dec 2010

    Alright, it's time to bring this issue back alive!

    I reapplied the patches to current trunk and after a few quick fixes it works like a charm. It was also quite easy to add support to Rebot. I wrote a few tests for robot and rebot, but more are needed.

    We still need to go through the code and add more tests, and of course document this feature before I dare to add this to version control (we hope to release this week, so I don't want to push anything that is not in ready for release). But I hope we could get this already to Robot 2.5.5.

    Nice work Régis!

  11. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @jussimalinen on 7 Dec 2010

    committed in r4428

  12. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @jussimalinen on 7 Dec 2010

    Implementation, acceptance tests and documentation are in. Its done.

  13. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @pekkaklarck on 7 Dec 2010

    Great that we got this in! And it didn't even take a year...

    Notice that we decided to use -x as a short option.

  14. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by rdesgroppes on 7 Dec 2010

    Thank you very much for having ported and completed the patch!

  15. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by Bulkan on 18 Jan 2011

    Just wanted to say thank you to Régis for this. Now RF has a tighter integration with the Bamboo CI that we use.

  16. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @pekkaklarck on 19 Jan 2011

    Notice that --xunitfile doesn't work well with --listeners in 2.5.5. This is already fixed ( issue 756 ) and will be included in 2.5.6.

  17. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by TuomasKi... on 11 Oct 2011

    noncritical issues pose a slight problem since they are not separated anymore from critical ones in xunit output. (https://code.google.com/p/robotframework-maven-plugin/issues/detail?id=12)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions