Babbling about something game automated testing (3)



I said earlier about the game status of automated testing some of the demand, a major talk about what can be done inside the game and what better to do, which is difficult to do and which do not need a number of reasons. Welcome Paizhuan Ha, I hope we all talk about your practice and benefits.

We are doing automated testing before the game, we first assume that we have designed the structure good enough, Yunxu we can pass our test tools, and get the game to run Zhuangtai Xiugai state of the game. Originally intended to write on almost five, and later be asked some friends, I will probably talk about the game structure is not taken into account when automated testing, automated testing can do something.

I understand the situation, the domestic online games are all object-oriented design and implementation methods, if there is not, and I have not contacted did not know what ways to do so once again assume that we The games are used in object-oriented design and implementation methods, keep in mind, here I have repeatedly referred to the concept of the object. Something behind the talk around the concept will be launched.

Or start with what kind of things do not recommend using automated testing it:

1. Performance class to subjective experience of test objects for testing purposes.

We all know that computers do most favorite is logical, rather than the human calculation. Why not do it, reason is that such testing is almost impossible to define the expected results, so it can not talk about test results, if no test results, then the computer what to do? This issue focuses on the client, such as images, sound, operational, of course, the design of the game balance and so on. Here the standard is in fact: when people can not express the logic of language expected results, do not try to automate.

2. A low cost, disposable labor and the development of large test objects.

The purpose of automation is to improve efficiency, not to automation and automation, nor to a person to perform the technical capacity. I've seen a company of a friend, he spent several days doing a test tool, just to save a person a half-day workload of the test. This is mainly an assessment needs to be done: this test is often it? The automated test development costs is how much? I've started to do when a colleague mentioned to me a demand, let me alone to run things a tool used to check the planning of new mention of a data file, the data file is just one of their design documents, and document the relationship between the data in such a plan is determined mood, I was stupid not to do pull grumble of her (I guess I was color fan-minded manner). I spent 2 days to do something, she would point a click of the mouse, then on the thing on permanently stored in the tool library, and do not know what year and what month this tool can be brought to light. I do not know whether there is a one day there will be planning to design this rule will their data table. Here that the relationship between the type of data file entirely through the corresponding data, if the corresponding relations changes, test code also needs to change, so reuse is not high, and this is only the result of their racking our brains, not our actual run in the game data files.

Having said that, now that anything which was suitable for automated testing:

Dry repetitive activities like computer logic, then we let him do such a thing right.

Simple math efficiency, assuming that a test requires 5 * 2 hours / day workload and repetitive work every day, like we do games, general games are required before the release version of the quality review, the If we can do our work, let the computer do it, how happy would be a thing ah! hypothetical game Sheng Ming period of 3 years, the first version released weekly, each release 10 hours before the absolute need for the workload So 3 years is 10 * 52 * 3 / 7 = 223, that is to spend 223 days a person's workload, this is actually one year's workload, and we need to develop this thing is only 10 days!

Automated testing when we do, generally do something generic, also called a platform, a tool, in this platform, we re-design their own behavior, by acting on the gaming platform, and then return the result through the platform to our test code.

And this platform will be returned to the front of the object referred to the concept, and we run in the game kind of logic are actually some of the behavior of objects. Can be combined with our testing we tested is actually a side of an object in a particular state, it did not produce a certain behavior and the behavior should not be generated. With this in mind, we designed automated test ideas on the clear.

First of all, the platform which I did not make the second argument, but in fact the concept. The platform is mainly achieved: Implement test code and the game communication, through this platform, we can obtain and modify the test code to run the game environment.

Long-term maintenance of this platform, when the game changed when some of the logic, the platform may need to change accordingly, as this may hinder the test. Platform is a common test code is object-specific design of the test.

We assume that now need to test a task (the following is the decomposition of this task I will look for the conditions and steps Ha):

1. To find a npc to mandate access to the a1.

2. To find other npc can not receive a1 task.

3. Character Level> = 10.

4. The role of a prop b.

5. Role pk value is greater than 5.

6. Deducting b props, the role of access to it a1 task.

7. Role in killing 20 of the monsters, you can cross the task.

8. Tasks do not repeat.