Skip to content

Releases: NyanKiyoshi/pytest-django-queries

Support of pytest-xdist 2.0

01 Mar 15:31
2aab623
Compare
Choose a tag to compare
  • pytest-xdist compatibility was fixed for latest major version: 2.0. The bad terminologies (slaves and masters) were removed;
  • Deprecated support of pytest-xdist <2.0, will be dropped on pytest-django-queries 2.0 release;
  • Official compatibility for Python 2.7, 3.4 and 3.5 was dropped.

Fixed daily CI job against PyPi

03 Sep 17:53
Compare
Choose a tag to compare
Pre-release

The daily CI ensuring the package is working fine upstream was failing, it is now fixed.

Fix compatibility with latest pytest-xdist - deprecate bad terminologies

03 Sep 16:00
Compare
Choose a tag to compare
  • Some tests were failing probably from a old file formatting.
  • pytest-xdist compatibility was fixed for latest major version: 2.0
    the bad terminologies (slaves and masters) were removed.
  • Deprecated support of pytest-xdist <2.0, will be dropped on
    pytest-django-queries 2.0 release.
  • Official compatibility for Python 2.7, 3.4 and 3.5 was dropped
    as many dependencies are no longer supporting those versions.
    Use this plugin on those Python version at your own risk.

Display duplicate query count

08 Aug 10:50
47a1325
Compare
Choose a tag to compare
  • The cli tools now display the number of duplicated queries.

First stable release!

08 Aug 10:49
Compare
Choose a tag to compare
  • Released the stable v1.0.0 release without any changes.

Third and final release candidate! Lots of workers!

06 Jun 16:24
Compare
Choose a tag to compare

The plugin now supports pytest-xdist which allows you to run as many tests per worker as you want while running our plugin!

In the second release candidate we also did:

  • Renamed the marker description to be more meaningful about was it does.
  • Fixed a typo in the project description (PyPi and GitHub).
  • Added help texts for named parameters in the cli.
  • Fixed the wrong help text saying it is taking an integer when it actually expects a file path.
  • Users can now mark tests without having the count_queries fixture injected automatically if a custom order or manual usage is needed.
  • Added a better filtering of unwanted keywords in humanization of test names. It now handles test cases names inside modules (dotted import names).
  • Added a backup command to django-queries to make it easier of making a copy of the current results.

First release candidate! Stability!

27 May 15:52
Compare
Choose a tag to compare
Pre-release

v1.0.0rc1 - May 24th 2019

  • Users can now backup/copy their previous results using the --django-backup-queries parameter when running pytest.
  • The HTML cli command now exports to django-queries-results.html by default instead of stdout, instead, users have to run django-queries html - for the output to go in stdout.
  • The code now enforces the Black code style and Flake 8 checks in addition to isort.

Diff command!

24 May 17:51
Compare
Choose a tag to compare
Diff command! Pre-release
Pre-release

You will now be able to run django-queries diff and get results looking like this:

diff_results

This version is going toward a stable release which should come very soon.

First alpha! - The save path is now a constant

13 May 16:37
Compare
Choose a tag to compare
  • In #12, stopped storing the benchmark results in a file named after the current date and time.
    Instead, it will always save into .django-queries and won't contain a json file extension
    anymore to make it less appealing as it's not meant to be read by a human.
  • In #12, dropped the environment variable PYTEST_QUERIES_SAVE_PATH and replaced
    and introduced the --django-db-bench PATH option instead, which does exactly the same thing.

TL;DR: a report will be generated in your current working directory and will be called .pytest-queries.
To override the save path, pass the --django-db-bench PATH option to pytest.

The result visualizing tools are now implemented

12 May 16:43
Compare
Choose a tag to compare
  • Introduced the cli (#3) with two commands:
    • show that process a given benchmark result to render a summary table
    • html render the table in HTML, the template can be customized using --template <path>
Usage: django-queries [OPTIONS] COMMAND [ARGS]...

  Command line tool for pytest-django-queries.

Options:
  --help  Show this message and exit.

Commands:
  html  Render the results as HTML instead of a raw table.
  show  View a given rapport.

Visualising Results

You can generate a table from the tests results by using the show command:

django-queries show <json file>

You will get something like this to represent the results:

+---------+-------------------------+
| Module  |          Tests          |
+---------+-------------------------+
| module1 | +-----------+---------+ |
|         | | Test Name | Queries | |
|         | +-----------+---------+ |
|         | |   test1   |    0    | |
|         | +-----------+---------+ |
|         | |   test2   |    1    | |
|         | +-----------+---------+ |
+---------+-------------------------+
| module2 | +-----------+---------+ |
|         | | Test Name | Queries | |
|         | +-----------+---------+ |
|         | |   test1   |   123   | |
|         | +-----------+---------+ |
+---------+-------------------------+
| module3 |                         |
+---------+-------------------------+

Exporting the results (HTML)

For a nicer presentation, use the html command, to export the results as HTML.

django-queries html <json file> > results.html