天天看点

Automation test script kickoff system

In my QA career, always heard the complain from Automation QA, why? After they execute the automation testing scripts, they have to update the result manually, of course there are solutions to do that automatically, for example, write a function to read the result log, then update the result to excel file. But, there is no a solution which can support all of the Test Case Manage System. And no solution can not get the results of first ten cases, eg: you have kickoff 1000 cases, if the first 10 cases failed, you want to get the status in time, then you can abort the execution of next cases, to diagnotic what's the reason of failure.

In order to solve the problems above, I start to develop the system to match those.

The functionalities of the system

  update automation testing results in any Test Case Management System

  dispatch the tasks (automation test) to target testing machines

  return the on-the-fly results

  timeout mechianism to control the process of automation test execution

  stop the execution of automation test

The structure of this system

Automation test script kickoff system

In server-side:

there are several services,

Job Dispatcher : Used to receive requests, save message, dispatch tasks to targets

Polling Service: Get the status of task

In client-side:

Agent Service: listen to the coming request, execute the automation test, monitor the status of the execution, update results

Build Service: Connect to source control server

Basic process

1. Agent Service Register itself to Job Dispatcher (Machine Name, Hardware info) in first start

2. Job Dispatch put the Agent Info to DB

3. Coming request to Job Dispatch, Job Dispatch generate a task by this request and put it into DB

4. Polling service query the tasks which in DB, if Agent's status is available, task status is not start, then notify Job Dispatcher, and set the status of Agent is busy, set status of task is start

5. Job Dispatch get the task, notify Agent Service to sync code from source control server, build all code, meanwhile, start a background thread to monitor the process, when build successfully, start to execute the automation test

6. update testing result to Test Case Management

Technlology

We hope the system is flexable, portable, we choose WCF as the main tech to develop this system.

The Job Dispatcher , Agent Service are developed upon WCF, it easily to be call and configure.

继续阅读