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.

Log how test discovery and execution is done

See original GitHub issue

Environment data

  • VS Code version: 1.24.1
  • Extension version (available under the Extensions sidebar): 2018.5.0
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda(Python 3.5)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Relevant/affected Python packages and their versions:

Actual behavior

unittest doesn’t run when selecting ‘Run Current Unit Test File’.

Expected behavior

unittest is ought to run.

Steps to reproduce:

  1. Create any unittest case file.
  2. Right click inside the file and select ‘Run Current Unit Test File’.

Logs

Output for Python Test Log in the Output panel

start

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

[Extension Host] Error: read ECONNRESET 

settings.json

{
    "python.linting.enabled": false,
    "python.pythonPath": "D:\\path\\to\\conda\\env\\python.exe",
    "python.unitTest.unittestArgs": [
        "-v",
        "-s",
        ".",
        "-p",
        "*test*.py"
    ],
    "python.unitTest.pyTestEnabled": false,
    "python.unitTest.nosetestsEnabled": false,
    "python.unitTest.unittestEnabled": true
}

Alert message: No tests discovered, please check the configuration settings for the tests. No tests ran, please check the configuration settings for the tests.

It was working with VSCode 1.18.1 version, upgraded to the latest version and it doesn’t seem to work to ever since then.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
brettcannoncommented, Jul 10, 2018

I’m leaving this open as we still want to log in the Output what we are doing for test discovery so people can notice that their tests are not being discovered by the test framework and not because of anything the extension is doing.

0reactions
luabudcommented, Sep 11, 2019

We’re logging this now, so closing this again 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test discovery error - can it be made helpful? - MSDN
Anytime you see some error in the "Tests" output, enable logging for the discovery process. It's outlined here:.
Read more >
Logs for horizontal discovery
The system collects logs to reflect the activity that takes place during a horizontal discovery based on both patterns and probes.
Read more >
What is Exploratory Testing? - Guru99
1. • Categorize common types of faults found in the past projects • Analyze the root cause analysis of the problems or faults • Find...
Read more >
Discovery and Run - Pester
Running code in Discovery is used for dynamically creating tests. That code should be placed into BeforeDiscovery , see Data driven tests. Execution...
Read more >
Testing Python in Visual Studio Code
python.testing.autoTestDiscoverOnSaveEnabled is set to true by default, meaning that test discovery is also performed automatically whenever you add, delete, or ...
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