0
votes

I'm getting the following error:

Calling method '_start_suite' of listener 'Data Driver' failed: Attribute Error: No "Test Template" keyword found for first test case.

This is the code that generates that error:

* Settings *
Documentation practice Library Data Driver file=../../Test Data/LoginData.xlsx sheet_name=Sheet 1 Library Selenium2 Library Resource ../../Keywords/Login Keywords.robot

* Test Cases *

test case 1->login test with excel

Open Website in chrome and Login with valid username and Logout Off the application

1
Can you please share your code to provide minimal-reproducible-example? - asprtrmp
In the question section with code format, not in the comments... - asprtrmp

1 Answers

0
votes

Goes as per documentation-

Test cases have to be defined with a Test Template. Reason for this is, that the DataDriver needs to know the names of the test case arguments. Test cases cannot not have named arguments.But Keywords can.

And for the error, Error: No "Test Template" keyword found for first test case. It might be because the Test template <keyword_name> you have defined did not match the <keyword_name> defined in the *** Keywords *** section.

And Also note this, which again is as per doc

The keyword which is used as Test Template must be defined within the test suite (in the same *.robot file). If the keyword which is used as Test Template is defined in a Resource the DataDriver has no access to its arguments names.