Is summary necessary in unit test method

后端 未结 8 890
忘掉有多难
忘掉有多难 2021-02-07 07:01

Since the naming of a unit test method makes its purpose more meaningful, is it necessary to add a summary to a unit test method?

Example:

/// 

        
8条回答
  •  抹茶落季
    2021-02-07 07:55

    I actually prefer to use the DescriptionAttribute over a summary tag. The reason being that the value of the Description attribute will show up in a results file. It makes failures easier to understand when you're just looking at a log file

    [TestMethod,Description("Ensure feature X doesn't regress Y")]
    public void TestFeatureX42() {
      ..
    }
    

提交回复
热议问题