Skip to content

Improve code coverage for System.Xml.Schema #20411

Closed

Description

@sepidehkh

These are some of the bigger types with low coverage in System.Xml.Schema. It would be great if we could add more tests to reach 80-90% coverage on these (data updated on 2017/12/11):

  • System.Xml.Schema.XmlAtomicValue 36.7% (was 33.7% originally)
  • System.Xml.Schema.XmlSchemaAny 36.5%
  • System.Xml.Schema.XmlSchemaAnyAttribute 74.5% (was 36.3% originally, see Improve SchemaAnyAttribute code coverage corefx#22020)
  • System.Xml.Schema.XmlSchemaCollection 42.6%
  • System.Xml.Schema.XmlSchemaInference 17.8%

Detailed coverage report:
https://ci.dot.net/job/dotnet_corefx/job/master/job/code_coverage_windows/Code_Coverage_Report/

Activity

  1. danmoseley commented on Mar 27, 2017

    @danmoseley
    Contributor

    Info on code coverage work:

    1. Here's the all up report
      https://ci.dot.net/job/dotnet_corefx/job/master/job/code_coverage_windows/Code_Coverage_Report/
      Caveat - doesn't show coverage of any types whose implementation is in corelib (eg String, etc). If you want to look at that for now you must gather manually using instructions below.

    2. Docs on code coverage work are here
      https://github.com/dotnet/corefx/blob/master/Documentation/building/code-coverage.md
      and some in
      https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md

    3. There's innumerable places to add coverage -- we would love to focus on the most heavily used types and the least covered types to get the most benefit.

  2. ilya-bin commented on May 15, 2017

    @ilya-bin
    Contributor

    Hi @sepidehms ,
    I'd like to participate in the issue but never did opensource before.
    I've just read all the related docs and style guides.

  3. sepidehkh commented on May 15, 2017

    @sepidehkh
    ContributorAuthor

    @ilya-bin Thank you for your interest in helping with this issue :)
    All the existing tests for System.Xml.Schema are here. You can add new tests under any of these two test projects or create a new test project, if that makes more sense, based on what the test is doing. You can find the information on what cases need to be covered from the links on this issue. After you write the new tests, you can submit a Pull Request and we will review your changes and help you get a clean build. After that, your changes can be merged.
    Feel free to assign this issue to yourself and don't hesitate to ask if you had any questions.

  4. ilya-bin commented on May 16, 2017

    @ilya-bin
    Contributor

    Dear @sepidehms
    I am moving on with the assignment (prepared environment, forked, built etc) but due to my poor experience I have some issues.

    1. I am not quite understand the tests projects structure. I see that XmlSchema covered for about 70% and Read() and Write() methods coverage would be effective. But I am not sure how to start, I am not seeing the corresponding XmlSchema test project. Porbably my approach to the projects structure is not quite right. Could you please assist me.

    2. This is just a formality about issue assignment. I am not sure I have the permissions to assign myself or anyone else.

  5. karelz commented on May 17, 2017

    @karelz
    Member

    @ilya-bin happy to hear that you want to contribute! I just sent you Collaborator invite. Once you accept, we will be able to assign the issue to you. Please ping us, when you accept.

    Assigning temporarily to @sepidehms.

    Also note that we have contributor docs under construction, please feel free to make them better - they are on wiki, which is RW for everyone: https://github.com/dotnet/corefx/wiki/New-contributor-Docs
    There's also new gitter chat room for new contributor docs if you want to ask questions others, and you can always ping us on the issue for help if you hit any road blocks. Thanks!

  6. sepidehkh commented on May 17, 2017

    @sepidehkh
    ContributorAuthor

    @ilya-bin
    The XmlSchema tests live in these two projects:

    You can take a look at the existing tests for the structure. About code coverage, the code blocks highlighted in red show the lines that are not covered by the existing tests, so we need to add scenarios that would hit those blocks.
    Although any improvement in terms of coverage is appreciated, for this issue in particular we are more interested in improving code coverage for the types mentioned in this issue's first comment. Those are the ones that are least covered by our tests.

    I hope this answered your question. Let me know if you needed anything.

  7. ilya-bin commented on May 17, 2017

    @ilya-bin
    Contributor

    Hi @karelz
    Thanks for the invite just accepted it.
    @sepidehms
    Thank you for the answer, I'll try to move on now, is it okay to ping you for the advice here in the issue comments, or should I use gitter instead?

  8. sepidehkh commented on May 17, 2017

    @sepidehkh
    ContributorAuthor

    @ilya-bin Please post your questions here and mention me. I just assigned the issue to you.

  9. ilya-bin commented on May 22, 2017

    @ilya-bin
    Contributor

    Hi @sepidehms ,
    I've tried to find anything in the test cases that is actually not so complicated for me and the place where it could be helpful. The case is that every straightforward public method in XmlSchemaSet is already covered with unit tests (which is actually good) and the lines that are not covered are hard for me. :)

    I think I've found a 3 line style enhancement that could be useful, please review PR dotnet/corefx#20115 if it could be helpful in any way.

    Thanks.

  10. sepidehkh commented on May 25, 2017

    @sepidehkh
    ContributorAuthor

    @ilya-bin That is fine. I will remove your assignment on this issue then. If you like to contribute, you can look for other up-for-grabs issues :) Thank you.

  11. ilya-bin commented on May 26, 2017

    @ilya-bin
    Contributor

    @sepidehms Thank you.

  12. 28 remaining items

  13. ViktorHofer commented on Sep 24, 2020

    @ViktorHofer
    Member

    Note that you also need #42678 to fix an illink issue during the build.

  14. dotnet-policy-service commented on Mar 26, 2025

    @dotnet-policy-service
    Contributor

    Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

    This process is part of our issue cleanup automation.

  15. added
    backlog-cleanup-candidate
    on Mar 26, 2025
  16. dotnet-policy-service commented on Apr 10, 2025

    @dotnet-policy-service
    Contributor

    This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.

  17. removed this from the Future milestone on Apr 10, 2025
  18. locked and limited conversation to collaborators on May 10, 2025
  19. removed
    backlog-cleanup-candidate
    on May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Xmlgood first issuehelp wantedincrease-code-coveragetest-enhancement

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions