<?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);
}
}