天天看点

@Repeat 注解 在单元测试中的应用

package com.collmall;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.Repeat;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * @author 
 * @create 2020-12-21 23:00
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class TestRepeat {

    @Repeat(10)
    @Test
    public void test () {
        // todo 编写自己的业务逻辑 eg:往数据库中插入10条数据
        System.out.println("===========================================");
    }
}