<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
regarding issue #1:<br>
<br>
correct me if i'm wrong, item._request object is individual per each
test executuion.<br>
if this is the case i can create item._request,cfg to include my cfg
params per each item, and to read them from the actual test
function.<br>
<br>
<u><b><br>
</b></u><u><b>on conftest.py:</b></u><br>
<br>
<br>
# Test starts hook<br>
def pytest_runtest_call(item):<br>
<b>item._request.cfg = item.cfg</b><br>
while True:<br>
r = wait_for_depend_item(item)<br>
if r:<br>
break<br>
item.start_time = datetime.datetime.now()<br>
item.config.logger.info2("\n\nRun-test: %s - %s" % (item.name,
item.cfg))<br>
<br>
<br>
<br>
<b><u>on t</u><u>est_cm file:</u><br>
<br>
</b> def test_cm_delete(request):<br>
<br>
cfg = request.cfg<br>
....<br>
<br>
<br>
Any comments will be welcomed.<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 08/09/14 17:29, Ayelet Regev wrote:<br>
</div>
<blockquote cite="mid:540DBD33.3060306@fabrixsystems.com"
type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
Hi,<br>
<br>
We are developing tests timeline based on py.test.<br>
In our setup:<br>
each test can run multiple times with different configured
configuration parameters.<br>
some tests thats need to be executed in parallel.<br>
we are using xdist and starting the run-call hook each time our
pre-required milestones are met.<br>
<br>
our configured timeline data:<br>
<br>
[<br>
{<br>
"test_func_name": "test_cm_delete",<br>
"timeline_name": "test_cm_delete_working20",<br>
"cfg": [<br>
{<br>
"comment": "ChannelMapname",<br>
"type": "string",<br>
"name": "channel_name",<br>
"value": "working_20"<br>
}<br>
],<br>
"dependency": [<br>
{<br>
"id": null,<br>
"start_after": null,<br>
"sync_type": "event",<br>
"sync_interval": 30,<br>
"sync_interval_scale": "Sec"<br>
}<br>
]<br>
},<br>
{<br>
"test_func_name": "test_cm_delete",<br>
"timeline_name": "test_cm_delete_working21",<br>
"cfg": [<br>
{<br>
"comment": "ChannelMapname",<br>
"type": "string",<br>
"name": "channel_name",<br>
"value": "working_21"<br>
}<br>
],<br>
"dependency": [<br>
{<br>
"id": "test_cm_delete_working20",<br>
"start_after": null,<br>
"sync_type": "event",<br>
"sync_interval": 30,<br>
"sync_interval_scale": "Sec"<br>
}<br>
]<br>
}<br>
]<br>
<br>
<br>
<b>our problems are:</b><br>
1) all nodes are started at once.<br>
for each node we need to send some other "cfg" data params to
execute the test.<br>
we would be happy to use request object as parameter for the
tests, but we cannot find any relation between the request and the
executed test.<br>
<br>
2) The other problems we are having related to the fact that each
xdist slave run in diffrent memory address so we cannot change
config object on one place to be read by all slaves during
execution.<br>
Any suggestions are welcome.<br>
<br>
<br>
<br>
<br>
Can you assist us?<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Best Regards,
Ayelet Regev Dabah
Email: <a class="moz-txt-link-abbreviated" href="mailto:ayelet@fabrixsystems.com">ayelet@fabrixsystems.com</a></pre>
</body>
</html>