Can anybody recomend a test case for sort functionality. I have a table whose column headers should be able to sort table data.The records retrieved could range bet', 1000-4000+
Currently I am using the following( its not the best )
(1)Retrieve the contents of table(1,1)
(2)click on column to sort
(3)Retrieve contents of table(1,1)
(4)Compare both values
(5) if not equal, sort succeeds.
Pl suggest any better ways to do. Thanks in advance.
You might want to capture the result of the sort into a file, then use some other sort utility (such as the "sort" command line utility in UNIX) to sort the result, and compare the results (UNIX' "diff" would be useful for this). Basically, you'd be using a 3rd party sort program as your test oracle.
1> Retrieve table
2> Click on the column header
3> Save resulted data in a text file
4> Repeat for each column header
5> Either programmatically using object type verfiy if the sort succeeded or even a quck scan through manually should be sufficient
I don't know if you're using an ASCII sort or a windows sort, or what you're sorting, but if it's possible to place test data into the table, I'd verify the sort (for example) by placing data with special characters, lower case, upper case, alpha, and numeric in the table. I would then run the sort and verify my entries appeared in the order expected.
In addition, I'd run the sort against a minimal amount of entries and a maximum amount of entries.
The data provided in the question is insufficient.
but assuming the table u r refering is a table in GUI and that the data is coming from a data base i will give a suggestion.
(1)Retrieve the contents of table.
(2)Retrieve the contents from database.
(3)Compare both values.
(4If equal data extraction successful.
(5)Click on column to sort.
(6)Retrieve contents of table.
(7)Retrieve the contents of database with the same sort order (eg. using Orderby clause).
(8)Compare both values.
(5)If equal, sort succeeds.