"...test data independant" (from post last week)
What do I mean by that ?
In automation, I try to avoid hard-coded test data which depends on whether the AUT database is in "start-position" or not.
Mostly I create test data during run-time using random values or getting random data from the AUT database which match my critera for the specific test case.
Consider a test case where you want to change an address for example. Here is an approach you could use (in pseudo-code]:
Select top 1 [myAddressColumns] from ADDRESS where [myCritera = True] order by newid() 'Note! Newid() MS SQL Server specificOptional
If blnNoAddressFound Then call createAddress 'In case of empty database call test case/method for create an address
Advantages:
Test case can be executed to any AUT database (empty or full)
You get test data variation using random values
Disadvantages:
It is more difficult to implement compare methods (but not impossible)
So, You “10x’d” Your Work…
-
There are lots of ways to “10x” things. Drive 300 miles per hour down a
busy city street. Eat 15,000 calories in one meal. Own ten dogs. Have ten
children....
2 weeks ago

No comments:
Post a Comment