Test discovery error, please check the configuration settings||Resolved

 

Test discovery error, please check the configuration settings Resolved

Issue -

When we use pytest in our python automation project we sometime see the error  message saying "Test discovery error, please check the configuration settings for the tests", now the issue is we will not get to see the exact issue as shown in below snippet.


Reason for issue-

-This issue comes up due to some or other error in your code in any of the step definition or test file. 
- Other reason could be that you missed to enable to pytest module in your project.


Resolution for issue -1

you need to find the list of error in your code, now to find the errors  you can either use Problems tab present under the terminal of Visual studio or you can go to output tab and select output as python test log as shown in below image.




Resolution for issue -2

you need to find go inside the .vscode folder and select settings.json file and enable the pytest framework for the project.

{
    "python.testing.pytestArgs": [
        "."
    ],
    "python.testing.unittestEnabled"false,
    "python.testing.nosetestsEnabled"false,
    "python.testing.pytestEnabled"true,
    "python.pythonPath""C:\\Users\\.virtualenvs\\pyt-uF11lD_o\\Scripts\\python.exe"
}


Thanks you please let me know if it helps..

Post a Comment