├── python-package-changelog.md ├── vscode-extension-changelog.md └── README.md /python-package-changelog.md: -------------------------------------------------------------------------------- 1 | # Python Package Changelog 2 | 3 | This changelog can now be found at [docs.kolo.app](https://docs.kolo.app/en/latest/python-changelog.html). 4 | The VSCode changelog can be found [here](https://docs.kolo.app/en/latest/vscode-changelog.html). 5 | -------------------------------------------------------------------------------- /vscode-extension-changelog.md: -------------------------------------------------------------------------------- 1 | # VSCode Extension Changelog 2 | 3 | This changelog can now be found at [docs.kolo.app](https://docs.kolo.app/en/latest/vscode-changelog.html). 4 | The python package changelog can be found [here](https://docs.kolo.app/en/latest/python-changelog.html). 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Kolo 2 | 3 | Trace and visualize your Python code. Generate working tests. 4 | 5 | [![downloads](https://img.shields.io/pypi/dm/kolo)](https://pypi.org/project/kolo/) [![Chat on Discord](https://img.shields.io/discord/899363528660635738?label=Chat%20on%20Discord)](https://discord.com/invite/FsTVcFwYUn) 6 | 7 | [![PyPI version](https://img.shields.io/pypi/v/kolo?label=python%20package)](https://pypi.org/project/kolo/) [![supported python versions](https://img.shields.io/pypi/pyversions/kolo)](https://pypi.org/project/kolo/) 8 | 9 | 📋 [docs.kolo.app](https://docs.kolo.app) 10 | 11 | 12 | image 13 |

Screenshot of Kolo from the Todo Demo app

14 | 15 | 16 | ## Quickstart 17 | 18 | Getting started with Kolo only takes a couple of minutes. The fastest way to understand what Kolo does and how it can be helpful is by trying it out on a codebase you work on. But if you're in a hurry or can't try Kolo on your own codebase, you can preview some functionality in our [playground](https://play.kolo.app). 19 | 20 | 21 | ### Trace a Django request 22 | 23 | *Trace a Django request for inspection, visualization, and debugging purposes.* 24 | 25 | 26 | 1. Install kolo using `pip install kolo` 27 | 2. Add `"kolo.middleware.KoloMiddleware"` to the top of your MIDDLEWARE list in settings.py 28 | 3. Start your Django server using `python manage.py runserver` and make a request to any page. 29 | 4. Browse to `localhost:8000/_kolo/` to view your traced request. It should look similar to the screenshot at the top of the page 🚀 30 | 31 | 32 | (For a more in-depth version of this tutorial see [How to: Trace Django requests](https://docs.kolo.app/en/latest/howto/trace-django-requests.html)) 33 | 34 | 35 | ### Generate a test from your trace 36 | *Now that we have a trace recorded, we can generate a working integration test from that trace.* 37 | 38 | 1. Navigate from the "Trace" page to the "Test" page. 39 | 40 | image 41 | 42 | 2. You'll see a page similar to the screenshot above, with your integration test waiting for you 🥳 43 | 3. Save the test file to your desired location or copy/paste it manually. 44 | 4. Then run the test in the same way you normally would to check that it's working. Make any edits as desired. 45 | 46 | 47 | #### Customizing test generation 48 | Every codebase has different testing requirements and code style. You can customize Kolo's test generation to suit your needs. Learn more about how to do this in [How to: Customize test generation](https://docs.kolo.app/en/latest/howto/customize-testgen.html) 49 | 50 | 51 | #### How does test generation work? 52 | 53 | Based on the data captured in the trace, Kolo first generate a test plan which includes the various "steps" it intends to include in the integration test. Each step in the plan is derived from some information in the trace itself. Then, based on the plan, Kolo then generates the test code on the left of the page. Learn more about how Kolo test generation works in [this blog post](https://blog.kolo.app/tests-no-joy.html) 54 | 55 | 56 | 57 | 58 | 59 | ## Support 60 | 61 | If you have any questions or trouble getting set up with Kolo, please get in touch with us. We're here to help and would love any feedback! 62 | 63 | * [Talk to us on Discord](https://discord.com/invite/FsTVcFwYUn) 64 | * [Create an issue](https://github.com/kolofordjango/kolo/issues/new/choose) 65 | * [Email us](mailto:support@kolo.app) 66 | * [Schedule a meeting with us to help get Kolo set up](https://calendly.com/wilhelmklopp) 67 | 68 | 69 | ## Screenshots 70 | 71 | What Kolo looks like when used with a real world Django application ([Simple Poll](https://simplepoll.rocks)) 72 | 73 | #### Viewing a trace 74 | image 75 | 76 | 77 | #### Exploring a trace 78 | image 79 | 80 | #### Viewing an SQL query 81 | image 82 | 83 | 84 | #### Viewing a function call 85 | image 86 | 87 | 88 | #### Generating an integration test 89 | 90 | image 91 | 92 | --------------------------------------------------------------------------------