Forum Discussion
davecoleman
Contributor
thanks for all the detail here. I'm going to work through some examples.
richie
3 years agoCommunity Hero
Hey davecoleman,
I never bothered responding to this as ChrisAdams was doing a cracking job and i couldnt have even come close to adding anything, but i just wanted to mention something in regards to your hardcoded assertions.
Obviously i dont know what youre asserting against in your responses, however if the testdata tests are changing everyday im guessing the expected results are changing everyday. With this in mind, i just wanted to highlight you can parameterise your assertions within the GUI, rather than hardcode them. I do this as much as possible (along with some other "tricks" (i.e. setup scripts, project/testsuite/testcase level properties, setup testsuites, reusable code, parameterisation) when creating a ReadyAPI project so i can lift and shift my ReadyAPI project to point at completely different environments with completely different data without having to change anything in project). If you know the assertion values for each testcase, you could include these in your Excel Datasource as an additional field for each test case. You could then parameterise your assertion to point to these values, removing the need to change hardcoded values.
Ok, that was all i wanted to mention,
Cheers,
Rich
I never bothered responding to this as ChrisAdams was doing a cracking job and i couldnt have even come close to adding anything, but i just wanted to mention something in regards to your hardcoded assertions.
Obviously i dont know what youre asserting against in your responses, however if the testdata tests are changing everyday im guessing the expected results are changing everyday. With this in mind, i just wanted to highlight you can parameterise your assertions within the GUI, rather than hardcode them. I do this as much as possible (along with some other "tricks" (i.e. setup scripts, project/testsuite/testcase level properties, setup testsuites, reusable code, parameterisation) when creating a ReadyAPI project so i can lift and shift my ReadyAPI project to point at completely different environments with completely different data without having to change anything in project). If you know the assertion values for each testcase, you could include these in your Excel Datasource as an additional field for each test case. You could then parameterise your assertion to point to these values, removing the need to change hardcoded values.
Ok, that was all i wanted to mention,
Cheers,
Rich
Related Content
- 3 years ago
- 3 years ago