天天看點

@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("===========================================");
    }
}