Daily Archives: 01/04/2012

What I Have Learned during Stored Procedure Testing

 

There are mainly two points about stored procedure testing: one is business logic, or realization function, and the other is the performance, that is how to find the optimal SQL statement.

Business Logic

When putting some stored procedures in the database, you need to test whether they have realized their functions without excessive functions, and whether you get the data you want without the useless data. The data is to be transmitted after acquiring it, so if there is unwanted data, though can be deleted when acquiring it, but it will give heavy stress to the server. As time goes by, errors can be unavoidable. In terms of a series of stored procedures, you need to figure out whether they accomplish what you need, and run the process smoothly.

In terms of testing of business logic, you can execute the statement in the database, and do a manual testing by sending in some parameters. You must ask whether automated testing can be conducted. Of course, there are some techniques. Simply, I achieved it by C language. I called stored procedure by ADO.NET, sending in some parameters and executing the stored procedure. Just by click a button, I would run all the stored procedure. In the process, it is hard to collect data, for the data has to be able to be used all the time.

To make it smarter or you don’t have to click a button and the stored procedure can be executed, of course we should set it to automatic operation when starting the PC. There is a tool named Nunit that can be used. You just need to write the stored procedure codes, and upload it after compiling, and it will run all the codes after clicking the execution button, and the ones impassable will be colored. Nunit can be used with other plug-ins like Nant, Nunit2Report, nantcontrib. An automated testing platform can be established with all these plug-ins combined together.

The Performance of Stored Procedure

Stored procedure comes from modified SQL statement. Speaking of the performance, it is also the performance of SQL statement. The performance of an SQL statement can be measured in many ways. Experienced guys will know the performance of most SQL statements. Thus, the first way is to observe the statement. At present, some software allows you to check the time spent in operating SQL statement, and you can figure out the performance of SQL statement. Under the same circumstance, it is obvious that the less time, the higher the performance.

There are several ways to check the time. PL/sq will show you the time of operating SQL statement. You can also call stored process by ado to check the time, which is very easy.

Did you like this? Share it:

My Opinions on Automated Software Testing

 

Automated Software Testing is to test automatically with automated tools according to the schedule, with an aim to reduce the amount of labor of manual test. The goal of automated testing is to find out old defects of the system, while that of manual testing is to discover new defects.

Automated testing mainly focuses on automation management and automation of dynamic testing in the software testing process (Unit Test, Functional Test, Performance Test).

Advantages of Automated Testing

1) Doing regression testing to the new versions: every time a new version is released, most functions and interfaces are similar to the last version.

2) Solving problems left by manual testing in non-functional aspects: stress testing, concurrency testing, large data volume testing, breakdown testing

3) Consistency and repeatability: for the automation is achieved by scripts, data can remain the same every time the test is conducted, and the scripts can be used repeatedly.

4) Able to do repeated and large numbers of tests: after the development work is finished, regression and integration testing should be done, and every functional point in the system has to be tested frequently.

5) Making the most of time of the weekends and the nights

Suitable for the Following Situations

1) Product type projects

2) Incremental development and continuous integration projects

3) Automatic compiling and releasing projects

4) Regression testing: it can find out whether you have introduced new defects and whether the old ones have been modified. To some extent, the automated testing tools can be called regression testing tools.

5) Repeated and mechanical tests: operations like repeated data input or key typing leads to unnecessary time and labor wasting.

What Requires Attention about Automation Testing

1) Selecting fewer automatic products and more platforms as possible to reduce costs

2) During testing process management automation, we should always remember that the testing team’s needs for process management support should be met.

3) When the investment is limited, functional testing automation should be put after performance testing automation

4) Besides cost performance, support service and service integrity should also be taken into full account.

5) Choosing the main-stream product, in order that it will be convenient to communicate with other companies to acquire more experience and business opportunities.

Misunderstandings about Automated Testing

1) Automated testing can replace manual testing, and the subject of testing is still the people.

2) Automated testing can discover old defects effectively, but can’t find out new ones. The more the new defects, the higher the failure rate of automated testing is.

3) Automated testing can’t test the user experience and interface appearance and something like that.

4) Automated testing requires large amount of test script maintenance work.

Not Suitable for the Following Situations

1) Customization projects

2) Projects with a short cycle

3) Business rules are complex

4) Light work load of testing

5) Unstable programs: there are many serious bugs or it is likely to break down

Did you like this? Share it: