junit5 - 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" ));
}
解决方案
推荐阅读
- python - 如何使用 Python 从网页中获取 href 链接?
- quarkus - 如何在 Quarkus 中获取 ThreadFactory?
- javascript - 关于单击 div 然后使用 ajax 更新 mysql 数据库的安全问题
- pytorch - 是加载模型不需要评估?
- css - 如何以纯 CSS 方式使 100% 宽度的 div 始终具有 50% 的相对高度?
- sql - 如果存在 sql SELECT
- xcode - 介绍滑块颤振图像未出现
- amazon-web-services - 如何在 cloudtrail 中创建“DecodeAuthorizationMessage”日志?
- swift - Firebase 身份验证创建用户但不将其信息添加到数据库
- android - 如何使用 setPositivebutton