Study for a long time finally understand how to successfully use the Baidu MTC client recorded on the script. Previously there was no information on how to successfully run the recorded script on Eclipse. Today I finally know what is going on here, record it here.
About Baidu MTC recording playback client download and use I will not say more, the official website to download on it. "The internet is a lot of this, but no one is how to use the script"
I use MTC just to record the script and then give the tester a script to test it. I've never been in touch with a script test. I was drunk ...
Recording the script and playback is not much to say.
1. The first thing to say is that before exporting the script to eclipse, the Click event's assert is removed from the MTC client (seemingly removed to ensure playback success).
2. After importing the script project into eclipse do not rush to run, the urgent operation will certainly be an error. Reported some of the most troubling mistakes. Online A search say what apk signature is inconsistent, I am also drunk, those solutions are wrong!!!
3. You will find that you have saved a copy of the file ***.xml.dir this folder and a ***.xml, XML is used for client playback. What is important is the contents of the ***.xml.dir folder. The replay.apk file is installed one time before each run of the script. I do not know why, experience is like this.
4. Make sure you have the APK "signed" and "REPLAY.APK" installed on your test machine, and the rest is out of the box , then you can right-click Run as-->android JUnit Test in the Eclipse script project. Then watch the mobile phone, moving up oh ... The test results are viewed in the JUnit window.
More wordy, haha, the following simple summary:
1. Use the signature package to be tested project huango.apk
2. Using the MTC recording script
3. Remove the assert of the Click event
4. Playback script confirms playback success
5. Export scripts to eclipse
6. Install the replay.apk in the tested huango.apk and **.xml.dir "Each time you run a script, install replay.apk first."
7. Make sure two apk (apk and script replay APK) are installed on the phone, make sure the signature is the same
8. Run the script to
Attach another sentence: reprint please indicate the source http://blog.csdn.net/enkezhang/article/details/44939947
Previously written blogs are not responsible for copying to other sites on the original paste. Don't disagree! Thank you.
Baidu MTC recording script export to eclipse really how successfully run up!