Breaking the record of useless test team curse 3 - how to plan and make automated testing

Breaking the record of useless test team curse 3 - how to plan and make automated testing


Previous mentioned test team to design a testing program that meets your needs, and get a test project that can run independently.

Why bother? ? As we get cleaner look! Its ultimate goal is to use it sucks house dust!

action

  1. Take out the vacuum cleaner
  2. Unplugged
  3. Pick up the cleaner lever, and press the power switch "ON"
  4. Change tips
  5. Withdrawing walking floor (which situation operation is repeated 4, 5)
  6. Press the power switch "off"
  7. Remove cleaner bags (box)
  8. Discard
  9. Closed cleaner

We can see that the average user is the practice in accordance with the above-mentioned actions, but it is difficult to be automated from start to finish it? ?

That should only make Honda's ASIMO played it! But a price must not cheap! And inefficient!

So, all the above-mentioned action "decomposition" and use "simple automated robot" to achieve the objective we want

first! Relatively inexpensive, simple and can also be collected during the test

Secondly! If you want to change or add test items do not change other test actions

Say! Asimo does not help us play computer Orz! Ask him to end to end tea is a good choice

And, we are most concerned about is! What time do automation? ?

To mean one thing, "Automation" is the need for maintenance costs, not to say that after just do it once back on the right.

It has several conditions that need to be reached, and any kind of process-independent (that is to say your team with CMMI, Agile, Scrum are the same)

  1. Each delivery must be running version (features may not be complete, as is to finish the complete process can still function type depends on the type AP)
  2. Independent testing environment (not referring to the developer's computer, the machine is not on the line)
  3. Automated before determining that the function is the result of "demand proven" (or PM is simply the customer wants)
  4. The feasibility of automated (for example, unplug the computer power to automate please find Asimo Thank you!)

Then take a look at those functions can be used

Please turn on Visual Studio 2010

image 
Respectively

  • Unit Test (for developers to write test procedures used)
  • The Test the Load 
    (stress test, may make 1000 simultaneous users on the plot line operations
    but must first have a Load Test, Web Test etc ......)
  • The Test Performance Web 
    (Automated Recording page, only to do all of the items will be recorded for the site, type the site is not affected, but can not record Silverlight, Flash Client-side programs, etc.)
  • The Test CodeUI
    (recordable WinForm, Web and other applications, and can be readily produce a "validation" function)
  • The Test the Ordered
    (if all three tests are the "rule" the order of the words! You can use this project definition)
  • The Test the Generic
    (manual test documentation, if TFS please use the Test Case Test Professional replaced)

For the first time we CodeUI Test how do recording and verification of action

Before there is PO text for Win form of Web so this time we will use it! (Before that CTP, the user interface is somewhat different)

Before take-designed "Test Case to verify whether the user is signed in to normal after login" (wrong test to another design)

    1. A user opens IE
    2. Enter the URL
    3. Press Login
    4. Enter the account number, password
    5. Press OK
    6. Go to shopping screen
    7. Confirm whether

image
Please select Record Action To start recording

image 
The lower right corner there will be a Test Builder appears, press OK to start recording "red" recording

image
Open IE, enter the URL of the test, there will be a record of every action (Beta 2 speed has been very CTP than shun)

image
After signing in, enter the confirmation operation page

image
OK! Up to this record, and all to just press the Generate Code "operation action" automatically converted into a program (.NET) of

image
Please give the name of a good press Add ...

image
When completed, this design will brighten up! Then we can verify whether the data is correct login

image
Please Torah past! You can see there will be a "blue" in the box (please note the box to the right to "object")

image 
After selecting the data to be validated Welcome franma, the icon according to the above verification

image 
If you want to = (equal), then please use AreEqual! (Pull-down variety of options can help determine)

image 
Finally, there will be a "tick" of the icon, if there are other attributes you want to verify, then! Please do according to the above steps! If not, then! Press "Add Generational ..."

image 
Ditto! Give it a name!

So far we do not write in any case one line of code to complete the test automation project

ps .. If there is more than one test verification points, then you can then press the "red record" icon, the Test Case has been done so far to do the project.

Visual Studio will return to the screen after pressing x

image
Look at the results, cooked UT friends ah! See if it is exactly the same structure with UT!

image 
How to run? In the "Explorer Program" in the Solution Items of xxx.VSMDI double-click or two, open test list

image 
Our test to determine the project appeared! You can press the upper left corner of the test execution

image
Then you can see the test is repeated it again!
See the Gogo on behalf of the Green movement test no problem, and verification of data are also ok! (Web Test and verification of projects in different places will be mentioned later)

In this way all of the production process automation is also a paragraph

Is not it simple?

But here we do intelligent Dear reader who must find that the account password is written dead ah! If there are 100 accounts are we going to record 100 times?

rest assured! This naturally there is a solution! do not worry!

……

Original: Large column  to break the curse useless test team record of 3 - How to plan and make automated testing


Guess you like

Origin www.cnblogs.com/chinatrump/p/11513116.html