3

Python's unittest framework is command line based. Instead of console output, I'd like to have GUI output. Specific task, that should be accomplishable:

  • start all tests per button
  • start single test per button
  • start group of tests per button
  • see output / result inside the GUI

( Kind of like Guitar for GTest in C++ )

Does anyone knows anything?

Searching results in the GUI itself as in "tkinter" for GUI applications.

2 Answers 2

2

Cricket does a good job: Screenshot of cricket

  • Install it:
    • pip install cricket
  • Navigate to folder, where all your testscripts are.
  • run cricket-unittest
  • You might be requested to install idle-python3.6:
    • sudo apt-get install idle-python3.6 (for ubuntu)

Source: https://github.com/pybee/cricket




screenshots:

// test demo use sanic_security/test/tests.py


test_result


fail_detail

1

vscode

those days, vscode also has unittest inside.


1. test pannel:

tests can be run (by click ▶ at right of item) by:

  • all
  • one folder
  • one file
  • one class
  • one function

test_pannel.png



2. test result:

errors (and success) can be shown at code side.

test_err_detail.png



3. outputs

all test outputs

test_output.png




which extension?

seems the testing (like a flask) icon in side bar appear after python extension installed,

if it not exist, ctrl+shift+p Python: configure Tests it will shown.

// make sure python,pip installed in os
// tested on vscode 1.62 (I didn't see it before)

1
  • seems the testing (flask icon) in side bar appear after python extension installed
    – yurenchen
    Jan 27 at 6:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.