首页 > 解决方案 > java.lang.Exception:com.snc.it.spbo.valuescan.tests.NewITSMVRUnitTestsIT 类上没有公共静态参数方法

问题描述

我的测试运行良好,突然间我遇到了这个错误。

包 com.abc.tests;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.stream.Stream;
import org.json.simple.parser.ParseException;
import org.junit.Assert;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.api.Order;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

import com.snc.selenium.runner.WithUser;
import com.snc.util.SurfSNCTest;

import apis.NewVRUtil;


@RunWith(Parameterized.class)
@WithUser(defaultUser = "")

public class NewITSMVRUnitTestsIT extends SurfSNCTest {

    private static final NewUtil vr =new NewUtil();

    
    @ParameterizedTest
    @MethodSource("provideParamsForValidation")
    public void validateTests(String instance, String date, String comparison, Boolean flag) throws ParseException {

/*******

*********/ }

静态流 provideParamsForValidation() { return Stream.of(

// Arguments.of("abc", "2021-05-31", "three", "true"), Arguments.of("xyz", "2021-05-31", "twelve", "false" ));

    }

标签: junit5parameterizationparameterized-unit-test

解决方案


推荐阅读