How to do automation test for Maya plugin development? Python's unittest module? PyMel's test module? or anything else?
Hi all,
I'm going to create an automation test process for my Maya plugin development. And here is my basic ideas:
- create a root directory which includes test cases, e.g.
test_root\
|___testcase_0001\
| |____
test.ma | |____reference.png
|___testcase_0002\
|____
test_anim.ma (this is an animation file)
|____reference.001.png
|____reference.002.png
|____reference.003.png
- visit each test case directory, render the *.ma file and output the rendered image to test_tmp\testcase_*\
test_tmp\
|___testcase_0001\
| |____output.png
|___testcase_0002\
|____output.001.png
|____output.002.png
|____output.003.png
- compare the output image(s) with the reference image(s). And generate the difference image if they are different, it means this test case fails.
test_diff\
|___testcase_0001\
| |____diff.png (if any)
|___testcase_0002\
|____diff.001.png (if any)
|____diff.002.png (if any)
|____diff.003.png (if any)
Now I'm looking for any available tools to create my automation test process.
I'm going to write my automation test scripts based on python's unittest module.
But I also find that PyMel has some scripts on test, and I'm not sure what it does. These test scripts locate at <MayaRoot>\devkit\other\pymel\tests.
My questions are:
1. What pymel's test script does? Is it suitable for create my automation test process? Is there any guid or tutorial?
2. Python's unittest module v.s. PyMel's test module. Could you give me any pros and cons on each of them?
3. Is there any other tools available for creating the automation test process for Maya plugin development?
4. How those big CG companies do the automation test for their Maya plugin development?
Any other suggestions are appreciated, and thank you in advance.
Cheers
yao