문제

Can we write generic test cases in BDD? I mean that we have a generic test class, and we could have an instantiator to instantiate the value that we want and then execute the test?

도움이 되었습니까?

해결책

BDD has a strong focus on customer communication, so I would recommend not to write generic test cases, as it will likely be harder for a customer to understand. For example, I would prefer:

authenticates_user_with_4_digit_password
authenticates_user_with_8_digit_password

However, you should do what works best for your situation and if your customer understands a generic test case, then you should use it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top