I have to design a framework for search functionality in an application.Now for that i need to search using different conditions or fields like search on status,date, user id etc and after searching i have to follow same steps for each and every condition and check whether test fails or pass...Now my problem is how to create a framework to search on different fields??
Well a framework should be built to handle all of your tests, not just these search tests.
These tests just sound like a matter of setting up the data. Input paramaters like <SearchType> <SearchTerm>.
If your environment data is fixed(so search results would always be the same) then you could include a parameter for number of results or some such. As well as a check that the search term is present on the result page and maybe a page or two of the linked result pages.
Why not design a function instead of a framework whereby you pass the object, associated data and expected response. will be simpler and a lot quicker to get running that a framework (or what I think of as a framework)
thanks mark for reply can you elaborate a bit....as i need to check the search functionality using different fields.
For example: I will search using user id and then a search result window will appear after that we will follow some steps. Next we will search using the status and the search window will appear after that we will follow same steps as followed during the first step.