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

Not displaying full status when running large amount of tests #21344

Open
paulacamargo25 opened this issue May 31, 2023 · 14 comments
Open

Not displaying full status when running large amount of tests #21344

paulacamargo25 opened this issue May 31, 2023 · 14 comments
Assignees
Labels
area-testing bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team

Comments

@paulacamargo25
Copy link

Testing #21306

Running this tests
Screenshot 2023-05-30 at 5 41 28 PM

First run the test with 100, and everything seems to work, then update the range to 100000. The tests start to run, the wheel appears in the previous 100, when the test ends I see that the previous 100 appear as complete, but the new ones appear as if they were never run.

Screenshot 2023-05-30 at 5 40 42 PM
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label May 31, 2023
@eleanorjboyd
Copy link
Member

Hi! When you switched to 10,000 did you reload the test UI?

@eleanorjboyd eleanorjboyd added area-testing info-needed Issue requires more information from poster and removed triage-needed Needs assignment to the proper sub-team labels May 31, 2023
@paulacamargo25
Copy link
Author

No, i only run the tests again

@eleanorjboyd
Copy link
Member

eleanorjboyd commented Jun 1, 2023

I am still not able to repro this, these are the steps I followed. Could you provide steps or a video?

  1. Open inc_dec_example_repo
  2. discover tests with pytest
  3. change from @pytest.mark.parametrize("num", range(1, 10)) to @pytest.mark.parametrize("num", range(1, 100))
  4. do not click save instead just click the "run" button in the test explorer UI (double arrow at the top to run all tests)
  5. I also tried using the gutter with the parameterize test to run it which also did not work in repro the bug
  6. I see all the 100 tests with the green checkmark

@eleanorjboyd
Copy link
Member

@paulacamargo25 to follow up, do you still experience this issue?

@paulacamargo25
Copy link
Author

What i did extra is that i run the first tests. yes sure, im going to try again

@eleanorjboyd
Copy link
Member

eleanorjboyd commented Jun 5, 2023

so like:

  1. Open inc_dec_example_repo
  2. discover tests with pytest
  3. run pytest
  4. change from @pytest.mark.parametrize("num", range(1, 10)) to @pytest.mark.parametrize("num", range(1, 100))
  5. do not click save instead just click the "run" button in the test explorer UI (double arrow at the top to run all tests)
  6. I also tried using the gutter with the parameterize test to run it which also did not work in repro the bug
  7. I see all the 100 tests with the green checkmark

I tried these steps and still got it working as expected.

@eleanorjboyd eleanorjboyd changed the title Error running large amount of tests Not displaying full status when running large amount of tests Jun 5, 2023
@paulacamargo25
Copy link
Author

I was able to reproduce the issue, the problem occurs when you save the file and immediately run the tests afterwards.

Screen.Recording.2023-06-05.at.4.47.02.PM.mov

@eleanorjboyd
Copy link
Member

eleanorjboyd commented Jun 6, 2023

Ok sweet I was able to repro the issue. this seems to be the fix so we can test when this is merged to make sure. Thanks!

@eleanorjboyd eleanorjboyd added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jun 6, 2023
@eleanorjboyd eleanorjboyd added this to the June 2023 milestone Jun 16, 2023
@eleanorjboyd eleanorjboyd added the verification-needed Verification of issue is requested label Jun 26, 2023
@eleanorjboyd
Copy link
Member

verification steps:

  1. Open a repo with pytest parameterized tests
  2. discover tests with pytest
  3. run pytest
  4. change from @pytest.mark.parametrize("num", range(1, 10)) to @pytest.mark.parametrize("num", range(1, 100))
  5. save file
  6. click the "run" button in the test explorer UI (double arrow at the top to run all tests)

@alexr00
Copy link
Member

alexr00 commented Jun 28, 2023

I am a python noob and I cannot get my test to be discovered. My steps:

  1. pip install pytest
  2. In my python project add a test folder and add mytest.py to it.
  3. put this in mytest.py:
import pytest


@pytest.mark.parametrize("num", range(1, 100))
def test_odd_even(num):
    assert True
  1. In the test view, Configure Python Tests and choose pytest and then my tests folder

No tests are discovered.

@alexr00 alexr00 added the verification-steps-needed Steps to verify are needed for verification label Jun 28, 2023
@alexr00
Copy link
Member

alexr00 commented Jun 28, 2023

Sorry to add the verification-steps-needed label, I know you have steps, but I am stuck despite the steps 😳.

@eleanorjboyd
Copy link
Member

No worries!! I was rushing a bit when I wrote the steps so missed some important parts:

  1. In your settings file set "python.experiments.optInto": ["pythonTestAdapter"],
  2. Open a repo with pytest parameterized tests or create a new blank repo
  3. create a file that starts with test_ or end with _test and add the code @alexr00 included above
  4. discover tests with pytest
  5. run pytest
  6. change from @pytest.mark.parametrize("num", range(1, 10)) to @pytest.mark.parametrize("num", range(1, 100))
  7. save file
  8. click the "run" button in the test explorer UI (double arrow at the top to run all tests)

@eleanorjboyd eleanorjboyd removed the verification-steps-needed Steps to verify are needed for verification label Jun 28, 2023
@rzhao271 rzhao271 added the verified Verification succeeded label Jun 28, 2023
@rzhao271
Copy link

In Paula's demo, there is no step 7. Clicking the run button seems to save the file for me, and I still see a bug that way:

The green checkmarks seem to be updated more consistently after I change it from range(1, 10) to range(1, 1000), but the counter at the top still says 29/37 tests passed.

@rzhao271 rzhao271 reopened this Jun 28, 2023
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jun 28, 2023
@rzhao271 rzhao271 removed the verified Verification succeeded label Jun 28, 2023
@rzhao271 rzhao271 added the verification-found Issue verification failed label Jun 28, 2023
@eleanorjboyd eleanorjboyd removed verification-needed Verification of issue is requested verification-found Issue verification failed labels Jun 30, 2023
@eleanorjboyd eleanorjboyd modified the milestones: June 2023, July 2023 Jun 30, 2023
@eleanorjboyd
Copy link
Member

delaying to next iteration as I have to make some design decisions around how to best render with dirty changes vs cache for pytest.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jun 30, 2023
@eleanorjboyd eleanorjboyd removed the info-needed Issue requires more information from poster label Jul 7, 2023
@eleanorjboyd eleanorjboyd modified the milestones: July 2023, August 2023 Jul 25, 2023
@brettcannon brettcannon modified the milestones: November 2023, December 2023 Nov 27, 2023
@joaomoreno joaomoreno removed this from the December 2023 milestone Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

6 participants