Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logs are getting mixed in Visual studio test explorer #298

Open
sampath-ganesan opened this issue Oct 17, 2024 · 2 comments
Open

Logs are getting mixed in Visual studio test explorer #298

sampath-ganesan opened this issue Oct 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@sampath-ganesan
Copy link

Reqnroll Version

2.1.1

Which test runner are you using?

MSTest

Test Runner Version Number

3.6.0

.NET Implementation

.NET 8.0

Test Execution Method

Visual Studio Test Explorer

Content of reqnroll.json configuration file

No response

Issue Description

  1. when initializing the web driver we had to use AsyncLocal to initiate the browser this i am doing because when test run in browser its returning same webdriver session id to all scenarios which will do the action in that webdriver session only (Is there anything we can do on reqnroll project to solve this?)
  2. when running in parallel run with this change + AsyncLocal i am able to run scenarios in parallel without any issues but the issue starts at the reporting when i see the report i can see the standard out is not having the proper output such as if i run 4 scenarios and all scenarios got executed then only one scenario have the standard output for all 4 scenarios along with thread Id so i did some changes on

Steps to Reproduce

  1. create project that will initialize the web driver using AsyncLocal
  2. run scenario in parallel
  3. in the report scenario logs are getting mixed with each other

Link to Repro Project

No response

@sampath-ganesan sampath-ganesan added the bug Something isn't working label Oct 17, 2024
@ajeckmans
Copy link
Contributor

For issue 1: What is the intended behaviour? A browser session per scenario?
For 2: Does this also happen when you run from console? I can image you're somehow only getting a reference to the outputwriter for the first scenario/test thread. That would mean your dependency resolving/injection is slightly off. Do you have a minimal reproduction somewhere?

@sampath-ganesan
Copy link
Author

sampath-ganesan commented Nov 11, 2024

hi,

  1. its opening A broker session per scenario and execution is getting succeeded with Support for scenario-level parallel execution #277 these changes but the logs are getting mixed for example if i run it in three thread and the thread id is 1,2,3 this is the output i am getting this is one scenario
    1 -> scenario 1 step 1 log
    1 -> scenario 2 step 1 log
    1 -> scenario 3 step 1 log
    and other scenarios is not having any logs
  2. this one i tried in visual studio i haven't tried in console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants