kgress / scaffold

A Java based Selenium WebDriver abstraction
MIT License
4 stars 7 forks source link

Create a new annotation for @Test that includes the @DisplayName #7

Closed kgress closed 2 years ago

kgress commented 5 years ago

Summary

Right now, we are using Junit Jupiter's @Test and @DisplayName on our test cases. We could wrap both of these annotation to a single @Test annotation on Scaffold so we can write the DisplayName of the test inline with @Test.

@DisplayName currently provides value in formatting the SauceLabs Dashboard test results with a String other than the test method name.

For example, a single @Test annotation that looks like this:

@Test("Clicking Go Should Do the Thing")
public void testGoButton() {
    insertLogicHere();
    assertion;
}

A/C

kgress commented 2 years ago

I'm not sure there's a ton of value in bubbling this up into one annotation, at the moment. By default, test methods are used as the display name when running, which I think is more than enough.

In the future, a possible idea could be to automatically parse the default test name into properly formatted display names.