Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 45091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:45:16+00:00 2026-05-10T15:45:16+00:00

I would like to be able to add a message to a unit test,

  • 0

I would like to be able to add a ‘message’ to a unit test, such that it actually appears within the TestResult.xml file generated by NUnit. For example, this is currently generated:

<results>     <test-case name='MyNamespace.Tests.MyTest' executed='True' success='True' time='0.203' asserts='4' /> </results> 

I would like to be able to have an additional attribute (or node as the case may be), such as:

<results>     <test-case name='MyNamespace.Tests.MyTest' executed='True' success='True' time='0.203' asserts='4' message='Tested that some condition was met.' /> </results> 

The idea is that ‘message’ above would somehow be defined within the test method itself (in my case, generated at run-time). Is there a property somewhere that I’m missing to be able to do something like this?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:45:17+00:00Added an answer on May 10, 2026 at 3:45 pm

    This may be missing the point, but how about naming the tests so they indicate what they test – then you may not even need the message.

    If it proves to be absolutely necessary, I think you’ll need to produce your own testrunner that would (off the top of my head) read an additional attribute off the TestCase and attach it to the output.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to be able to add a new SQL LOGIN and name
I would like to be able to add a click event to a entity
I would like to be able to add to a custom class in the
I would like to add a uitoolbar able to slide -in from the top
Would like to be able to set colors of headings and such, different font
I would like to be able to use the Tab key within a text
I I would like plugins to be able to add properties to my models.
I would like to add a PDF file containing corperate identity information and graphics
What I would like to do is have a standard error message that uses
I would like to get the username of an accessed file (add, delete, rename,...).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.