Excluding integration tests in pattern-drive JUnit run configuration

已回答

Hi,

In run configration of JUnit, if I use pattern, what syntax is expected there? For example this regex ^.*(?!LimitIT)$ is happily selecting *all* JUnit tests, however it should (if we assume, that java regexes are supported here) accept all but those ending with LimitIT.

So 1/ what is expected syntax here? 2/how does look like pattern which excludes all tests ending in IT suffix? Is it even possible?

 

thanks.

0

Hello, to exclude the integration tests you may use the pattern like:

^(?!.*IT$).*$

0

Thanks a lot. I understand now why my regex was wrong.

0

请先登录再写评论。