<?xml version="1.0" encoding="utf-8" ?> <suite name = "parameter"> <test name = "para"> <parameter name = "name" value="zhangsan"/> <parameter name = "age" value="10"/> <classes> <class name = "com.course.testng.Parameter.ParameterTet"/> </classes> </test> </suite>
package com.course.testng.Parameter; import org.testng.annotations.Parameters; import org.testng.annotations.Test; public class ParameterTet { @Test @Parameters({"name","age"}) public void parameter(String name,int age){ System.out.println(); System.out.println("name = "+ name+"; age = "+age); } }
原文地址:https://www.cnblogs.com/dwdw/p/11411736.html
时间: 2024-11-07 06:20:53