no classification
no tag
no datas
posted on 2023-11-12 14:30 read(599) comment(0) like(5) collect(3)
This is what needs to be achieved: we create a driver instance. start two threads/processes - one will execute the signup (or any other) testcase and the second will execute another testcase (a trigger, change network to slow, or otherwise)
I've read that python itself wasn't really built with multi-threading in mind like other languages (although there are packages that claim to do this), so I would lean towards multi-processing. You should be able to pass necessary data to corresponding parts of the code (the different processes) to do what you wish. If you're doing things that involve the same driver in both tests, you may want to consider either not running the tests at the same time (order them), or make two driver instances and pass one to each process (although I've seen some problems trying to do this with the requests package trying to make too many simultaneous connections, this was without multi-processing though). If this is a problem you run into with multi-processing, it would be interesting to see if multi-threading handles this, but you may have to run the tests simultaneously on different machines or VM's if neither provides a solution. Hope this helps
Author:qs
link:http://www.pythonblackhole.com/blog/article/245162/da94b6f68b66838abe60/
source:python black hole net
Please indicate the source for any form of reprinting. If any infringement is discovered, it will be held legally responsible.
name:
Comment content: (supports up to 255 characters)
Copyright © 2018-2021 python black hole network All Rights Reserved All rights reserved, and all rights reserved.京ICP备18063182号-7
For complaints and reports, and advertising cooperation, please contact vgs_info@163.com or QQ3083709327
Disclaimer: All articles on the website are uploaded by users and are only for readers' learning and communication use, and commercial use is prohibited. If the article involves pornography, reactionary, infringement and other illegal information, please report it to us and we will delete it immediately after verification!