Best way to automagically migrate tests from JUnit 3 to JUnit 4?

前端 未结 7 1794
天命终不由人
天命终不由人 2020-11-29 20:14

I have a bunch of JUnit 3 classes which extend TestCase and would like to automatically migrate them to be JUnit4 tests with annotations such as @Before,

7条回答
  •  独厮守ぢ
    2020-11-29 20:56

    There are, to my best knowledge, no available migration tools (yet). What I know is this:

    • Last year, at OOPSLA in Nashville, was a paper about API migration but alas their tools seems not be openly available. I'll provide the link to the paper, (even though I dare it is of little use for you since it is rather theory heavy): "Annotation Refactoring: Inferring Upgrade Transformations for Legacy Applications".

    • Above, I wrote "no available tool (yet)" because my student Lea Hänsenberger is currently working on an auotmated API migration from, not onyl, JUnit 4 a to JExample, but also from JUnit 3 to JUnit 4. Please follow JExample on Twitter to get notified when she releases a first beta.

    I hope this information was of help for you.

提交回复
热议问题