문제

I am writing functional tests using TestNG, and I have a few dozens of similar tests with different data. I would like to use DataProvider to reduce repeating code.

But some of those tests pass, some fail (due to a known defect). I want to disable failing tests until they are fixed, so they don't spoil whole picture of test run.

I see that AnnotationTransformer can change test annotations dynamically. Can AnnotationTransformer disable test only with some of the data sets? Or will it disable test with all provided data and it is better not to change anything?

Thanks in advance.

올바른 솔루션이 없습니다

다른 팁

Why not simply put these failing tests in a group, say "broken", and exclude that test from your runs? Much simpler than using an annotation transformer, and the reports will show you which groups were excluded, so there is no risk to miss any when comes the time to ship.

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