Framework of Software Testing Based on Cloud Computing

For the problem that efficiency is low and cost is high existing in the traditional software testing method, this paper tested software using cloud testing technology. It introduced related technologies including cloud testing, and described the design of overall architecture for the system in details, designed and implemented the scheduling module using a high priority first scheduling based on dynamic priority. The MATLAB simulation results are that the total turnaround time of the scheduling algorithm in this paper is short when the same tasks are scheduled and increase slowly when the number of tasks is increased than traditional FCFS. This shows that this scheduling algorithm could reduce test cost and realize the automation of software testing under the condition of significantly improving test efficiency and resource utilization.


Introduction
Software testing is the process of executing programs for finding bugs. As an important means to ensure the quality of software, software testing has been paid more and more attention in the software engineering. However, in the traditional single point and localized testing process, the high purchase of test tools, the construction of complex testing environment and other issues limited the development of testing technology seriously. Cloud computing is a new type of distributed computing model, which utilizes virtualization technology to manage the infrastructure resources in the cloud through the network, and form the user-oriented business service model. James A. Whittaker looked forward to "the future of software" and insisted the software testing service based on cloud computing (Whittaker, 2010). To date, the research on cloud testing focuses on the following three aspects. The first is the cloud testing, involving the internal structure of cloud computing, resource allocation, function expansion and many other aspects of testing. The second is testing migration, which means traditional testing methods, managements, processes and frameworks are migrated to the cloud (Parveen, 2010). The last is using cloud to test other software systems. This paper mainly introduced the third method, which is to provide services to users based on the cloud platform and could solve problems existing in the traditional testing methods.
The research of software testing system based on cloud computing is rapidly developing and becoming a hot spot (Tilley, 2012). It has been applied in the fields of banking application software, railway system, mobile service system, which lead to good achievements. Through the research of scheduling strategy, the software testing could have better parallelism and automation, so as to improve the service quality. This paper presented a cloud test solution for software testing, designed an overall structure of testing system and analyzed and implemented the subsystem.

The step of cloud testing
In the process of cloud testing, the user first puts forward the testing request to systems, and then the system accepts the testing tasks. Furthermore, the middleware service and virtual resources are deployed so as to realize the testing execution and supervision. Finally, the testing results are collected. The step of cloud testing is shown in Figure 1.

The design of system architecture
The idea of cloud computing could be tracked back towards the time-sharing mechanism of computers. During that period, individuals carried out calculation and programming through the terminal and PC, and could control their computing environment and select a computing software and customized system in accordance with their requirements. After entering the cloud era, data and programs are disappearing from the desktop, and the whole user interface might depend on a window based on the web browser. There are 3 types of cloud computing, as shown in Figure 2.
(1) Software as a service (SaaS): Users hire specific applications and databases to meet their own needs. At this point, Users can not control the operating system, hardware and frame facilities in the cloud. (2) Platform as a service (PaaS): Expect for servers, users also hire the system software in the cloud. At this point, Users cannot control the operating systems and frameworks in the cloud.
(3) Infrastructure as a service (IaaS): Users can hire as many servers as possible in accordance with the actual requirements through the use of servers. In this model, users can change, control and adjust the cloud operating system. Figure 2 The system architecture

Design and Implementation of Scheduling Sub Module
In the cloud testing, the deployment strategy of parallel testing tasks in testing management module is quite important, due to it involves the deployment and scheduling of virtual devices and the dynamic deployment of testing tasks. This paper designed and implemented the scheduling sub module of the cloud testing system.

Structure of scheduling sub module
After the user submits the testing tasks, the number of virtual machines should be predicted indispensably in accordance with the number of tasks and the analysis of test items, which could reduce the requests due to excessive waste of virtual machines. In addition, it can avoid the wast of testing time due to the insufficiency of testing machines.
. Figure 3 The structure of scheduling sub module

Procedure of algorithm
The testing tasks suitable for cloud testing are independent of each other. In the testing task scheduling process of cloud testing platform, there is no need to consider the dependencies among tasks, which simplifies the algorithm used in the scheduling process.
The scheduling system uses a high priority scheduling algorithm based on dynamic priority, that is, the priority of the testing tasks would alternate with the execution of the tasks or the waiting time of the tasks, and then the priority tasks will be executed first.
(1) In the scheduling process, the number of tasks and virtual machines are assumed to be limited. Assuming the number of independent tasks is n, it could be represented by .
It is now agreed that any task can be executed on any virtual machine, but interrupt processing is not allowed before the completion of relevant tasks. Furthermore, no task can be split into smaller sub tasks. In each scheduling process after the first scheduling, the number of tasks waiting to be executed is assigned to n, and the number of idle virtual machines is assigned to m. Two queues are defined as follow: WaitList stands for testing tasks waiting queue, and FreeVMList represents the idle virtual machine queue.
(2) The user submits the testing tasks through the system interface, and gives the weighted value to each task in accordance with the entrance of WaitList.
When the user submits the testing tasks, the weight of each task in determined. According to the waiting time, operation time and weight value, the priority calculation formula is as follows. (1) Here, j T stands for task j； j M stands for virtual machine j; j q stands for the waiting time; j d stands for the operation time; j w stands for the weight value; j p stands for the priority;  stands for control parameter.
(3) According to the analysis of the number of testing tasks submitted by the users, the number and configuration of virtual machines are predicted. In addition, the operating systems testing systems are deployed automatically according to the different testing environments, which could reduce requests for new resources during the testing execution. However, this kind of prediction based on experience and templates has certain error.
(4) The number of tasks in the WaitList queue is assigned to n, and the number of virtual machines in the FreeVMList queue is assigned to m.
(5) When n>m, the redundant processor is released and the virtual machine j M is assigned to the task j T , and then the corresponding processor is released immediately after the testing task has been executed. (7) A series of new tasks and an error in the execution process are added into the WaitList queue,and then the idle virtual machines are added to the WaitVMList queue as well. Finally step (4) is not repeated until all of the tasks are executed correctly.

Verification
This paper realized the algorithm in above description and the classic FCFS algorithm using MATLAB. Through the simulation and verification, the efficiency of both of two algorithm are analyzed from a mathematical perspective. The assumption of virtual number is 250, the number of testing tasks n respectively are 50,150,250,350 and 450, whose testing times are different. From the verification results as shown in Figure 4, we could make the following conclusions. At first, when the number of virtual machines is larger than the number of tasks, the execution time of the algorithm described in this paper is a constant, and the time of FSFC algorithm in increased due to the increase of the number of tasks. Secondly, when the number of virtual machines is smaller than the number of tasks, the execution time of algorithm in this paper is increased slowly, while the FCFS algorithm is increased fast. At last, the execution efficiency of the algorithm in this paper is nearly 20% higher than that of FCFS algorithm. Figure 4 The efficiency of two algorithm

Conclusion
Combined with cloud computing technology, this paper introduced the structure and framework of cloud testing. Besides, a high priority scheduling algorithm is utilized based on dynamic priority is conducted to realize the scheduling subsystem of the whole system. The proposed scheduling algorithm could significantly improve the testing efficiency and reduce the testing purchase compared with the classical FCFS scheduling algorithm. At last, the implementation of other modules and improvement of system security would be the focus of the next research.