locked
Creating custom tags in trx file RRS feed

  • Question

  • I have a requirement wherein i need to write some custom info, say "Bug id" on each of the unit tests i have written using MS Unit test. After doing this, I want the info in trx file in a custom tag say, Bug id : 1234 under tag. Currently, it writes the info to trx file in tag in a para graphic manner under tag. I further need to make use of this Bug id in my business logic. but problem is, the tag already contains some other info(related to text executions) in para graphic manner and it just appends the Bug id to the existing paragraph.

    The information looks something like this, <Output><Stdout>ksnvfvnfnnfnvvffvkvfd mvomovodmdmmdv Bug id : 1234</Stdout></Output>

    What i want :  <Output><Stdout>ksnvfvnfnnfnvvffvkvfd mvomovodmdmmdv <CustomTag> Bug id : 1234 </CustomTag></Stdout></Output> IS THIS POSSIBLE???

    Wednesday, October 31, 2018 6:48 AM

All replies

  • Hi Likhit,

    I also did much more research and test it in my side, I didn't find the direct way to output the custom tags to the trx file even if I get much more information about how to output the messages or test property to the trx file.

    TestProperty("xxx", "xxx")]
    TestContext.WriteLine("xxxx");
    But not found other ways which could output the custom tags with TestContext Class.

    Not the real developer team members, but one idea is that it should have other files which supports the custom tags, maybe you could transform the trx file's format, and then custom the tags for the fire which support it. Just a thought, maybe it could provide you a path.

    Sincerely,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 2, 2018 3:36 AM