Automate functional testing with solr search engine


News: Automate functional testing with solr search engine

  1. A friend gave me a problem to build a painless functional testing tool. They have all kinds of testing tools [Rational, Mercury, Agitor (Unit testing) ]. Still they face following difficulties: - After sometime the recorded scripts become unmanagable - Too much to record for a good coverage - Skill ncessary to operate the testing tool and writting the scripts -Too much setup work and regular registance from developers -Data changes invalidate the recordings. OK, if you are thinking being discipline will make it happen; you are right. But it pains :( Let the machine be deciplined and do the heavy lifting. I took this problem and applied the search engine to solve it. First, Preparing the request Goals - Record from all kinds of clients which access a server. - Sense and create simillar requests - Minimal human touch Steps I will write TE for test engine. The TE server will listen for requests from the client. After accepting a request, it establishes a new connection to the application server. Now TE works as a conduit between application client and application server. Intermediately it records all the communications. Putting the TE is easy by manipulating the hosts file or the web prowser proxy. Consider our application is a web application. The browser client makes an GET or POST request to the application server. These requests are pretty clean. However, sometimes they carry some past burden as - The session information and things like that. - Some last processing details - Cookie information TE need to undersatnd and know all these information. TE will do it by passing the request through many filters. Here I am proposing few filters to detect what the request parameters are: - The recorded cookie - The last results returned; If any matches we know the source. (Example session ID) - Coded entry in the forms of the application. Ex. Instead of real employee write empName. This is a instruction to TE to replace it with a real employee accessing other data sources like template database, test database, user provided values, regular expression based random values... Other examples will include phone 888-8888888. - Direct specification of tablename.fieldname - Matching sample data type from the provided test data search index. Working on the response result Goals - Sense and perform first phase of validation. - Picking only gold from the result - Minimal human touch with sampling Steps TE generates large amount of similar requests and plays automatically. TE catches server responses. Most of the content are JUNK to us. TO remove the JUNK it needs to go through the filters of: - Ignore the binary content like image files, css, javascript, XSLT and other unnecessary stuffs. - Parse the content of xml, html, swf files. - Throw the unnecessary words. What is left is gold. Try to sense the results, This will help system to validate in absense of the test engineer. Now all these results are presented to the test engineer and test enginner validates the output. Test engineer validates the sensed fields. On need basis test enginner maps the result field to D/B table fields. Now for next play on the same request, TE knows what are the outputs to perform first phase of validation. TE provides configured 5% record & play dialogue for validation. Are you thinking why I need a search engine? If yes, I have put this to boost up the performance. Once the test data table goes to single search engine index; All tables including fields are searchable to enhance the sensing mechanism. Why You think this "will not work"? Posted with architecture diagram at VOX

    Threaded Messages (3)

  2. Eh?[ Go to top ]

    I appreciate the amount of work that went into this and that English is not your first language but I just didn't understand this. I re-read this a couple of times, but to be quite honest, I found it to be like hard work. OK, I understand that you're using a proxy to record the browser session which seems to be standard practice but I never really got my head around how the search engine fits in or how the solution is in any way better or offers anything new over what is already available. Please accept my apologies if everyone else thinks that the explanation is sufficiently clear - perhaps I'm just thick. Regards Mark
  3. Thanks for the comment on the English.. Yah.. It's pretty bad from childhood and sorry about that. OK.. Let's talk about the differences. I am going to highlight on top 2 differences; Difference # 1 - It senses the information type from a given request and generates multiple simillar requests Let's take an example of a a contact application, the "Create a contact" test is recorded. In this recording, a name is provided say "Mark" and the phone "99999999". The test engine senses the provided data types as "Person" and "Phone Number". Now it generates multiple request of simillar type and tests it. So we are just recording once and playing simillar requests thousands times. There are multiple strategy to do this. What is the use of search engine - The search engine helps to senses the data types. Otherwise I need to search all tables for all provided request parameters. Difference # 2 - Extracting UI elements from the response. The validation is automatic and purely on the business information. In a functional testing, the validation should be based on what I see in the browser; not on what is the source of the page. To make the validation simple, consider saving the page as text in the browser ( File -> save as -> Text File) and in the subsequent requests comparing this text content only. Currently, most of the tools need human touch for this.
  4. you seem to have lot of technical knowledge and i appreciate that. But challengeing the capability of Test management tools is stretching a bit too much. So have you developed the test engine? Why don't you provide the link so as to let the software talk....i hope it is not just your technical fantasies gone wild......any way good luck to you