I am new to Angular
and Protractor
. I have written couple of protractor test cases to automate registration, login and some other pages. To execute a test case for example student registration, I need to pass some data like name,dob,age,address etc, right now I hardcoded those values in my test cases which is not best practice so I want to externalize these input data values for all my protractor test cases. I have below thoughts around this but not able to decide which one is the best approach and industry standard.
- Keep input data in
JSON
file for each test set separately. - Keep all test sets input data in single
JSON
file. - Keep the test data in .js file read it from there.
please suggest me the best approach and any other best practices I should consider while writing protractor UI test cases as I am completely new to this framework.I am using protractor with jasmine 2.x
.
-Amar.