|
 Thanks: 0
 Likes: 0
 Dislikes: 0
-
Apprentice
Python Framework for Testing
I am new to python..
1) Which is best unit test framework in Python for windows command line application? nose, unittest etc...?
2) How to execute python scripts from one host machine to different machines?
For e.g. we have test steps which require to run on different machines, step1 on windows1 machine, step2 in windows2 machine etc. now I want to start execution from one host machines (executor) but actual test should run on different machines (step1 on one and step2 on machine two). And final result file should be generate on host machine (executor)
Please answer this, as I need to start ASAP..
-
SQA Knight
 Originally Posted by drajpura1
I am new to python..
1) Which is best unit test framework in Python for windows command line application? nose, unittest etc...?
2) How to execute python scripts from one host machine to different machines?
For e.g. we have test steps which require to run on different machines, step1 on windows1 machine, step2 in windows2 machine etc. now I want to start execution from one host machines (executor) but actual test should run on different machines (step1 on one and step2 on machine two). And final result file should be generate on host machine (executor)
Please answer this, as I need to start ASAP..
I think NoseTest2 is a good base. For configurability, I've created WTF to run on top of nose to make web test configuration easy. https://github.com/wiredrive/wtframework you don't have to use the selenium piece.
For multi machine execution, you might want to use a actor/messaging framework such as Code Connected - zeromq
You may also want to consider commercial tools that support multi agent UI testing, I believe Squish has some python bindings, coupled with a messaging framework, you can do distributed UI testing.
But my professional opinion is the maintainability of distributed tests are a pain. It's usually more maintain able to fake out the interactions of the 2nd actor on a request level. This makes the coordination easier, the code easier to maintain, and the ability to parallelize multiple tests much easier.
-
New Member
Nose example
For completeness in following the styles of previous framework introductions, here is the full basic test.
This only differs from above that I’ve added another test function.
from unnecessary_math import multiply
def test_numbers_3_4():
assert multiply(3,4) == 12
def test_strings_a_3():
assert multiply('a',3) == 'aaa'
1
2
3
4
5
6
7
8
9
from unnecessary_math import multiply
def test_numbers_3_4():
assert multiply(3,4) == 12
def test_strings_a_3():
assert multiply('a',3) == 'aaa'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|