TestNG 执行报错 “Parameter 'xxx' is required by BeforeClass on method beforeClass but has not been ma...

解决方案,从下面几个方法入手:

第1种. 注释 @Parameters 是从 org.testng.annotations 导入的
第2种. ideas 运行,右键单击该类并选择,run as TestNG test,然后确保编辑运行配置并提供JVM参数。-Dbrowser=firefox
第3种. maven命令行运行,使用 mvn clean test -P Regression
第4种. 从 testng.xml 执行

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。