first, the basic premise of iOS testing
There is no basic grammatical error. Basically, it can be run.
Second, test the basic steps of the approximate
requirements, develop test plans, design test cases, implement tests (first to build a test environment), manage tests to find bugs, test completion (test bugs and corrections), write test reports (each of these types: unit tests, integration tests, system tests, validation tests go through these steps.) )
1. Testing Requirements
The test requirements need to be written with the required documentation, and the requirements document is missing.
2. Test Plan
1, the first stage: the improvement of basic functions
2, the second stage: unit Test (whether the expected)
3. Integration Testing
1.1 Basic memory leaks are checked
Shortcut key is Command+shift+b
Instruments tools in 1.2Xcode check memory allocation and memory leaks
2, automated testing of iOS
Tree structure in iOS apps
UIATarget.onAlert = function onAlert(alert) {var title = alert.name();UIALogger.logWarning("Alert with title " + title );target.delay(5);UIALogger.logMessage("message");if (title == "Are you sure to exit?") { target.delay(5); alert.buttons()["OK"].tap(); return true; }return false;
}//test the code that pops up the warning box (this code must be placed before the code that pops up the warning box)
var target = Uiatarget.localtarget ();
Target.delay (2); Delay
var testname = "Test Asiaweiluy";
Uialogger.logstart (testname);
Output day start will have the corresponding end output log
Enter your account
Target.frontmostapp (). MainWindow (). Scrollviews () [0].images () [1].textfields () [0].tap ()];
Target.delay (1);
Target.frontmostapp (). keyboard (). Typestring ("Testwanjomb");
Target.delay (3);
Some common code in the test
Test results:
To test iOS considerations:
Test the problems that arise and some caveats:
1) Gesture recognition is not very high.
2) The test process needs to be reasonable to modify the test code, set the appropriate time distance
3) on Xib: Accessibility (√) enabled or
Code: mytextfield.accessbilityenabled = YES;
4) Note:
1. You must first have this app on your phone
2, look, you must choose the app on the phone, otherwise not
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Examples of automated tests for iOS basic tests