question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support parallel execute suites?

See original GitHub issue

All interface calls share a session, which is the session generated by the [Create Session] function.

On this basic, we want to do concurrency, using pabot, that is, the robot framework-pabot library, so the way we want to use is: all multi-threads share a session for concurrency, so the [Create Session] function is currently called only once, and then all threads share the session.

The session can be retrieved from multithreads in my test , but when the interface is invoked, it is found that other thread interface requests fail:

error messages:

KEYWORD RequestsLibrary . Get Request ${agent.session}, ${uri}, headers=${header}, timeout=${timeout}
Documentation:	
Send a GET request on the session object found using the

Start / End / Elapsed:	20181109 15:06:36.520 / 20181109 15:06:36.523 / 00:00:00.003
15:06:36.523	FAIL	Non-existing index or alias 'adminsession'.

So I would like to ask if we support concurrent scenarios?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
lucagiovecommented, Mar 4, 2019

@Huanxin-leolil why do you matter about having the session created only once? Pabot spawn different processes that cannot share anything directly, so what you need is to create one session for each process but basically what you want to do is just to add everything needed for your tests in a Setup Suite or Setup Test. So that session is always available from every process and it’s shared in a way that has the same configurations but is not exactly the same instance. Hope that helps.

0reactions
Huanxin-leolilcommented, Nov 13, 2018

Thanks! If the way of sharing session with multiple threads is supported, I think it must be a great achievement. And look forward very much !!! @vkosuri

Read more comments on GitHub >

github_iconTop Results From Across the Web

TestNG Parallel Execution - How to run Selenium tests in ...
What is parallel execution in TestNG? How to execute parallel testing using methods & classes & suites in TestNG with Selenium WebDriver.
Read more >
How To Perform Parallel Test Execution In TestNG With ...
In this blog, we will see how to perform parallel test execution in TestNG on multiple browsers for Selenium automation testing.
Read more >
Parallel Execution in Selenium: Session Handling & ...
To understand how to run selenium scripts in parallel with Multiple Browsers. Let's first understand Session Handling. During test execution ...
Read more >
TestNG - Parallel Test Execution
TestNG parallel execution of tests, classes and suites. Learn to run multiple tests in different threads or a single test in multiple ...
Read more >
How to run parallel test cases in TestNG
Step 3 Right click on the testing.xml file and select “Run As” -> “TestNG Suite”. Observe the time taken to execute both the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found