Searching bars are very common in most web applications. In order to test the search function, a few perspectives are available for consideration. For one example, we can calculate the search precision. In the context of information retrieval, precision is the fraction of retrieved entries that are relevant to the query.
Search Precision = Relevant Search Results / Total Search Results
As for the definition of relevance, it is totally up to the tester. It can be defined as the presence of search keyword in the result or even similar results if you are testing a fuzzy search. Here, I would like to provide an example of search precision calculation based on the keyword.
//accumulate the number of search results
i = i + driver.FindElements(By.XPath(/*you need to specify*/)).Count;
//accumulate the number of search results that contains the keyword
j = j + driver.FindElements(By.XPath(/*you need to specify*/)).Count;
//calculate the search precision rate
r = j / i;
Food for people struggling in the desert of software testing technology.
Subscribe to:
Post Comments (Atom)
Software Testing Tools
There are various software testing tools available for QAs to increase efficiency, visibility, accuracy, and ability of their work. The tool...
-
1. What is the difference between a use case and test case? They are both instances of using the product. But they differ in terms of ...
-
Searching bars are very common in most web applications. In order to test the search function, a few perspectives are available for consider...
-
Object-Oriented Programming Concepts in C# 1. Class A class is an abstraction of a group of similar entities. It serves as a customizab...
No comments:
Post a Comment