Simultaneous parameterization using Springjunit4classrunner and parameterized

Source: Internet
Author: User

The title is actually an impossible task, because we can only use a runwith annotation, and can only write a class, but we are able to curve the salvation, insert the bottom 5 to 14 lines can be injected into the

1@ContextConfiguration (classes = {XXXX.class })2@RunWith (parameterized.class)3  Public classXxxxtest {4 5     PrivateTestcontextmanager Testcontextmanager;6 @Before7      Public voidsetUp () {8Testcontextmanager =NewTestcontextmanager (GetClass ());9         Try {TenTestcontextmanager.preparetestinstance ( This); One}Catch(Exception e) { A e.printstacktrace (); -         } -     } the  - @Test -      Public voidxxxxtest () { -      //Your test logic +     } -}

Simultaneous parameterization using Springjunit4classrunner and parameterized

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.