Web Testing
Yesterday, I was assigned to prepare a test plan using OpenSTA (Open System Testing Architecture – www.opensta.org). It’s an open source distributed software testing architecture. It was designed around CORBA framework. Sound grand? Another good thing about this is that it’s open source. Nevertheless, it’s been developed using Microsoft Visual Studio 6, and I don’t have it at my office. So, I can’t compile it. That’s ok. Let me try what they have.
I was not going to implement the whole testing process. The plan was to prepare test script to send request to the server that run Tomcat and JProbe to profile the performance of the system.
OpenSTA is pretty cool. It allow user to prepare the test scripts. Then, drag those scripts to a test. In order to develop a test script, Script Modeler can capture what I do on browser and generate the script for me. What it actually does is that it sits between the browser and the server by setting the proxy setting in the browser to point to its gateway, so that it can capture all the packages that browser send and receive [ Browser <-> Gateway <-> Server ] to generate the script that say what data should be send to the server. The script is very flexible. I tried modifying a bit on the script to log in as a different user when running the test.
The web application that I was going to test was using HTTPS. OpenSTA also support HTTPS. It talks to server using HTTPS but talk to browser with HTTP. Special character “{“ is added before the server name to tell OpenSTA gateway that it should talk to server with HTTPS. That works fine, but on environment that I worked on (Windows XP with IE6), it will popup security dialog for every request sent to the server (*_*) which mean that I have to click the button on the dialog for every request to let it show on the browser. No, it’s not just a click per page, but I popup for every single request (for image file, CSS file, JS file, etc.). I had a chance to exercise my index finger.
At the time I try this OpenSTA, it’s not supported non-HTTP content such as Flash or Applet. The system that I had to test did use Applet. Nevertheless, the Applet on the system was used for display purpose only. So, that should not affect much on the testing result because the purpose of the test is to test the performance, not the functionality.
At the end, I got an error when recording the script with Script Modeler on some pages in the system. Those pages contain some Applets and probably do something uncommon. I read through the FAQ and mailing list on OpenSTA website and found a few people that got the same problem (http://sourceforge.net/mailarchive/message.php?msg_id=531213
). Someone said that it cause by the bug of (Microsoft Windows - BUG: Winsock Control run-time error 10054 in DataArrival event for UDP) http://support.microsoft.com/kb/q260018/
I didn’t look through the source code because I don’t have MS Dev tools at my office. Actually, the script can be modified manually. I could browse through the test case and look in the Tomcat log file to see the requests and add those requests into the script, but it would be fun to try some other web test tools :D
Then, I got an idea of develop small and simple web testing tools myself. The concept is to have a small program that sit on IE and click through the link, submit the form, and act like there is someone testing the web application with the browser. By doing this we can test everything that works on the browser. So, I started with JavaScript. The plan is to write JavaScript that attach special behavior (event handler) to each object on the web page. The special event handler will record what user does with the object on the browser. The problem was I couldn’t access to the object on the web pages from my code in another frame. That’s again because of IE6. (http://support.microsoft.com/default.aspx?scid=kb;en-us;889407). Microsoft didn’t allow me to download fix file on its website, and recommends me to wait for the next Internet Explorer 6 service pack. To obtain the fix immediately, I have to contact Microsoft Product Support Services to obtain the fix. That’s ok. I’m not that serious to get it now. It’s just for fun. I wish I could finish this idea later. (-/\-)
I moved on to another test tools, JMeter from Apache Jakarta Project (http://jakarta.apache.org/jmeter). JMeter can be used to test many things such as Web, Files, Servlelts, Data Bases and Queries, FTP Servers. Pretty cool, huh? I started with testing the web application. JMeter also provides HTTP Proxy Server which can record what user does on web browser and create test sample objects in the test plan. Similar to what I did with OpenSTA. Unfortunately, it’s not supported HTTPS at that time. So, I click through the test case on my browser and read the Tomcat log file to enter the request to the test plan on JMeter manually. It would be easier and more effective if I understand the system. But I don’t know anything about the system, I didn’t involve in any part of the development of that application. That’s fine. I finally finished implementing the test plan and run it. JMeter is pretty cool. It was obviously designed in component based. It provides many components for the test plan both for running the test and monitor the result. I could implement the test that has many threads log in as a different user. There are also some other features that I hadn’t tried.
Web test tool are interesting. There are a lot of them out there on the Internet. I also tried the ActiWATE that provides the web testing framework that can work with JUnit. It has the same concept as HTTPUnit. I tried to write a small testing program to send the request to the server, fill in the username and password and submit the form to login, click through a few pages, and check the result. It work pretty well and not that hard to implement, just look through the API.
It would be interesting to develop a web testing tool that can act like it sit on a browser and work through the web application.
Yesterday, I was assigned to prepare a test plan using OpenSTA (Open System Testing Architecture – www.opensta.org). It’s an open source distributed software testing architecture. It was designed around CORBA framework. Sound grand? Another good thing about this is that it’s open source. Nevertheless, it’s been developed using Microsoft Visual Studio 6, and I don’t have it at my office. So, I can’t compile it. That’s ok. Let me try what they have.
I was not going to implement the whole testing process. The plan was to prepare test script to send request to the server that run Tomcat and JProbe to profile the performance of the system.
OpenSTA is pretty cool. It allow user to prepare the test scripts. Then, drag those scripts to a test. In order to develop a test script, Script Modeler can capture what I do on browser and generate the script for me. What it actually does is that it sits between the browser and the server by setting the proxy setting in the browser to point to its gateway, so that it can capture all the packages that browser send and receive [ Browser <-> Gateway <-> Server ] to generate the script that say what data should be send to the server. The script is very flexible. I tried modifying a bit on the script to log in as a different user when running the test.
The web application that I was going to test was using HTTPS. OpenSTA also support HTTPS. It talks to server using HTTPS but talk to browser with HTTP. Special character “{“ is added before the server name to tell OpenSTA gateway that it should talk to server with HTTPS. That works fine, but on environment that I worked on (Windows XP with IE6), it will popup security dialog for every request sent to the server (*_*) which mean that I have to click the button on the dialog for every request to let it show on the browser. No, it’s not just a click per page, but I popup for every single request (for image file, CSS file, JS file, etc.). I had a chance to exercise my index finger.
At the time I try this OpenSTA, it’s not supported non-HTTP content such as Flash or Applet. The system that I had to test did use Applet. Nevertheless, the Applet on the system was used for display purpose only. So, that should not affect much on the testing result because the purpose of the test is to test the performance, not the functionality.
At the end, I got an error when recording the script with Script Modeler on some pages in the system. Those pages contain some Applets and probably do something uncommon. I read through the FAQ and mailing list on OpenSTA website and found a few people that got the same problem (http://sourceforge.net/mailarchive/message.php?msg_id=531213
). Someone said that it cause by the bug of (Microsoft Windows - BUG: Winsock Control run-time error 10054 in DataArrival event for UDP) http://support.microsoft.com/kb/q260018/
I didn’t look through the source code because I don’t have MS Dev tools at my office. Actually, the script can be modified manually. I could browse through the test case and look in the Tomcat log file to see the requests and add those requests into the script, but it would be fun to try some other web test tools :D
Then, I got an idea of develop small and simple web testing tools myself. The concept is to have a small program that sit on IE and click through the link, submit the form, and act like there is someone testing the web application with the browser. By doing this we can test everything that works on the browser. So, I started with JavaScript. The plan is to write JavaScript that attach special behavior (event handler) to each object on the web page. The special event handler will record what user does with the object on the browser. The problem was I couldn’t access to the object on the web pages from my code in another frame. That’s again because of IE6. (http://support.microsoft.com/default.aspx?scid=kb;en-us;889407). Microsoft didn’t allow me to download fix file on its website, and recommends me to wait for the next Internet Explorer 6 service pack. To obtain the fix immediately, I have to contact Microsoft Product Support Services to obtain the fix. That’s ok. I’m not that serious to get it now. It’s just for fun. I wish I could finish this idea later. (-/\-)
I moved on to another test tools, JMeter from Apache Jakarta Project (http://jakarta.apache.org/jmeter). JMeter can be used to test many things such as Web, Files, Servlelts, Data Bases and Queries, FTP Servers. Pretty cool, huh? I started with testing the web application. JMeter also provides HTTP Proxy Server which can record what user does on web browser and create test sample objects in the test plan. Similar to what I did with OpenSTA. Unfortunately, it’s not supported HTTPS at that time. So, I click through the test case on my browser and read the Tomcat log file to enter the request to the test plan on JMeter manually. It would be easier and more effective if I understand the system. But I don’t know anything about the system, I didn’t involve in any part of the development of that application. That’s fine. I finally finished implementing the test plan and run it. JMeter is pretty cool. It was obviously designed in component based. It provides many components for the test plan both for running the test and monitor the result. I could implement the test that has many threads log in as a different user. There are also some other features that I hadn’t tried.
Web test tool are interesting. There are a lot of them out there on the Internet. I also tried the ActiWATE that provides the web testing framework that can work with JUnit. It has the same concept as HTTPUnit. I tried to write a small testing program to send the request to the server, fill in the username and password and submit the form to login, click through a few pages, and check the result. It work pretty well and not that hard to implement, just look through the API.
It would be interesting to develop a web testing tool that can act like it sit on a browser and work through the web application.

0 Comments:
Post a Comment
<< Home