I wonder if it is possible to run performance testing based on xUnit?
Not sure what exactly you asking, but you can easily write your own custom attribute to do that. For an example..
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class TraceAttribute : BeforeAfterTestAttribute
{
public override void Before(MethodInfo methodUnderTest)
{
//Start timer
}
public override void After(MethodInfo methodUnderTest)
{
//End timer
}
}
Then decorate your Unit Test with the this attribute. Also make sure you write to an output ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With