Вопрос

Currently I have to know the no. of parameters I'm passing to the test function. Is there a way to pass parameters to the test function from the Data Provider as an array of indefinite number of elements? I'm reading rows of data from an excel sheet, and the idea is to execute each row as a separate test. I'm using testNG to run these tests.

Это было полезно?

Решение

Why not simply pass this parameter as an array? (which is in effect what the JVM does when you declare a varargs parameter)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top