Blog

In release notes for v6.5 we announced several plugins which will fetch test names and execution results from your automated test suite.

Plugins can be controlled via environment variables which will affect how test results are recorded in the Kiwi TCMS database! This blog post is an introduction how that works and what you can do with it! For this purpose I will be using the plugin-demo repository, which simulates real development work.

Full documentation and list of available plugins is available in chapter Automation Frameworks Plugins!

Always create new TestRun by default

The default behavior is always to create a new TestRun if controlling variables are not overridden! Product name, version and build will receive default values if tests are running in Travis CI or Jenkins. For example Travis Build #2 for commit d455fb4 creates TR-12 and TP-10!

Product=kiwitcms/plugin-demo
Version=d455fb42fb7c2aedadfd5f66de7d131109c03350
Build=2

Next we convert the README file from Markdown to reStructuredText which triggers Travis Build #3 for commit 418b80b. This build again creates a new TestRun and new TestPlan for it. Respectively TR-14 and TP-12!

Product=kiwitcms/plugin-demo
Version=418b80b3bbb65a799f695dc59d488c76f560fa2b
Build=3

Important: we can see that version is different which will affect how artifacts are organized in Kiwi TCMS, possibly affect how you will report status to stakeholders!

Override ENV variables for more control

Let's say the QA team has decided that all test results must be reported under the same TestPlan. This means version must be the same between various builds in Travis CI! To control this we export TCMS_PRODUCT_VERSION=master in CI before executing the TAP plugin! Checkout the commit on GitHub to see how it is done!

This triggers Travis Build #4 for commit e484e59. Because this is the first time where Version == master the plugin creates TP-14 and reports the results under TR-16.

Product=kiwitcms/plugin-demo
Version=master
Build=4

Right after that I realized we can make this configuration a bit more generic because our team is planning to support multiple versions of the product and development will be done in separate branches! Travis Build #5 for commit f1f2878 still ends up with Version == master because we are still working on the master branch! That is to say, the product is in active mode of development.

Results are reported in TR-18 which is again part of TP-14.

Product=kiwitcms/plugin-demo
Version=master
Build=5

Travis Build #6 for commit df6153b adds the new functionality README badges and reports test results in TR-20 which is again part of TP-14.

More ENV overrides

While giving status reports back to stakeholders and developers the information that we have in the TestRun is Build number! This follows the numbering scheme in Travis CI (or Jenkins job number) and isn't very useful.

Let's define TCMS_BUILD to be the first 7 characters of the commit hash! When QA tells devel that something isn't working and redirects them to the TestRun they can immediately use the Build information and git checkout the offending variant of the product for investigation.

This results in Travis Build #7 for commit bf75d0a, TR-22, TP-14.

Product=kiwitcms/plugin-demo
Version=master
Build=bf75d0a

Report results in pre-existing TestRun

There are many reasons you may want to do this:

  • include both manual and automation tests for the same build;
  • mix results from multiple test suites for the same build, e.g. unit, functional, performance
  • mix results from multiple but similar platforms in the same build, e.g. cross-platform application for iOS and Android

To do so I've created TR-24 beforehand and configured TCMS_RUN_ID=24 in my CI environment. TR-24 also contains TC-57: Verify we can report results from several plugins into the same TR. this was created and added via the web interface.

Note: mixing additional test cases can be done either before or after automation results are reported with the plugin!

Important: when reporting results to an existing TestRun Kiwi TCMS plugins don't care in which TestPlan this TR is! In theory it is possible to report the results for Product=kiwitcms/plugin-demo into any TP/TR pair! However we don't want to do this crazy thing and instead I've created TR-24 inside the already existing TP-14!

Note: because I don't know what is the git commit beforehand I've configured TR-24 with Build=unspecified. If I wanted I could update this with the correct value once I know the commit hash for the related changes I am testing.

Important: the plugin-demo repository uses both kiwitcms-tap-plugin and kiwitcms-junit.xml-plugin at the same time! They differ in the way test names are compiled! Both are reported in TR-24. See TC-57 text for information how to distinguish between the two.

See Travis Build #8 for commit 85ad939, TR-24, TP-14.

Product=kiwitcms/plugin-demo
Version=master
Build=unspecified

Also check-out comments in TR executions to see when and who had executed the test case.

So far there have been some tests which were failing (although Travis reports PASS) so I decided to fix them. Travis Build #9 for commit a25b384 is still configured with TCMS_RUN_ID=24. This means results will be reported in TR-24, effectively overwriting previous results.

Check-out Change Log under each individual execution and you will see several time stamps when status was updated! In other words, as long as TCMS_RUN_ID is pointing to an existing TestRun this TR will keep the results of the last test suite execution!

Continue development, restore ENV configuration

Travis Build #10 for commit c4f1ae5 removes TCMS_RUN_ID! Results are reported in TR-25, TP-14.

Product=kiwitcms/plugin-demo
Version=master
Build=c4f1ae5

Branch out for an LTS version

Our team has decided to make the first LTS release of the product. We branch out into lts-v0 branch in git and cut the first NVR. This results in Travis Build #11 for commit 9f1ef71 TR-27, TP-16.

Product=kiwitcms/plugin-demo
Version=lts-v0
Build=9f1ef71

Because this is the first time we are running tests for this product version we end up with the newly created TP-16!

Note: see how version was populated with the correct value for the git branch! This is because my CI config uses TCMS_PRODUCT_VERSION=$TRAVIS_BRANCH and no further changes were required! I made this change back in Travis Build #5 anticipating what will come in the future!

The product is now live and customers have reported critical bugs for it: URLs for the badges in README are wrong! I fix those and add more tests of course, see: Travis Build #12 for commit 2d72754, TR-29 for TP-16.

Product=kiwitcms/plugin-demo
Version=lts-v0
Build=2d72754

TR-29 contains the new TC-58!

cherry-pick between branches

In the lts-v0 branch customers have identified a serious issue. It doesn't exist on master but the test is still valid so I cherry-pick it! In git you can backport or forwardport very easily. Regardless of the direction Kiwi TCMS plugins will record the test results for you.

See Travis Build #13 for commit 31ae5b3, TR-31 for TP-14.

We can see that TC-58, which was originally implemented on the lts-v0 branch is now present!

Summary

This is a very basic example of how you can organize collection and reporting for your automation test suite results with Kiwi TCMS. The links here only refer to artifacts created by kiwitcms-tap-plugin while in the DB we keep others as well.

There are feature requests for more ENV variables which will allow you to control TestPlan creation and child/parent relationship between test plans. See https://github.com/kiwitcms/tap-plugin/issues and vote with a :+1: reaction to help us plan for these features.

Kiwi TCMS automation framework plugins are nothing more than result parsers which talk back to a database. It is up to you to decide how to organize the collection of test results and how to report on them later, when the need arises.

Future installments in this post series will take a look at workflows with feature branches and pull requests and discuss possible organization scenarios. You are welcome to share your ideas in the comments below.

Happy testing!

Kiwi TCMS 6.5.3

We're happy to announce Kiwi TCMS version 6.5.3! This is a security, improvement and bug-fix update that includes new versions of Django, includes several database migrations and fixes several bugs. You can explore everything at https://public.tenant.kiwitcms.org!

Supported upgrade paths:

5.3   (or older) -> 5.3.1
5.3.1 (or newer) -> 6.0.1
6.0.1            -> 6.1
6.1              -> 6.1.1
6.1.1            -> 6.2 (or newer)

Docker images:

kiwitcms/kiwi       latest  b9355cf85833    1.039 GB
kiwitcms/kiwi       6.2     7870085ad415    957.6 MB
kiwitcms/kiwi       6.1.1   49fa42ddfe4d    955.7 MB
kiwitcms/kiwi       6.1     b559123d25b0    970.2 MB
kiwitcms/kiwi       6.0.1   87b24d94197d    970.1 MB
kiwitcms/kiwi       5.3.1   a420465852be    976.8 MB

Changes since Kiwi TCMS 6.5

Security

  • Update Django from 2.1.5 to 2.1.7. Fixes CVE-2019-6975: Memory exhaustion in django.utils.numberformat.format()

Improvements

  • Update mysqlclient from 1.4.1 to 1.4.2
  • Multiple template strings marked as translatable (Christophe CHAUVET)

Database migrations

  • Email notifications for TestPlan and TestCase now default to True
  • Remove TestPlanEmailSettings.is_active field

API

  • New method Bug.report(), References Issue #18
  • Method Bug.create() now accepts parameter auto_report=False

Translations

Bug fixes

  • Show the user who actually tested a TestCase instead of hard-coded value. Fixes Issue #765
  • Properly handle pagination button states and page numbers. Fixes Issue #767
  • Add TestCase to TestPlan if creating from inside a TestPlan. Fixes Issue #777
  • Made TestCase text more readable. Fixes Issue #764
  • Include missing templates and static files from PyPI tarball

Refactoring

  • Use find_packages() when building PyPI tarball
  • Install Kiwi TCMS as tarball package inside Docker image instead of copying from the source directory
  • Pylint fixes
  • Remove testcases.views.ReturnActions() which is now unused
  • Refactor New TestCase to class-based view and add tests

How to upgrade

If you are using Kiwi TCMS as a Docker container then:

cd Kiwi/
git pull
docker-compose down
docker pull kiwitcms/kiwi
docker pull centos/mariadb
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate

Don't forget to backup before upgrade!

WARNING: kiwitcms/kiwi:latest and docker-compose.yml will always point to the latest available version! If you have to upgrade in steps, e.g. between several intermediate releases, you have to modify the above workflow:

# starting from an older Kiwi TCMS version
docker-compose down
docker pull kiwitcms/kiwi:<next_upgrade_version>
edit docker-compose.yml to use kiwitcms/kiwi:<next_upgrade_version>
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate
# repeat until you have reached latest

Happy testing!

Kiwi TCMS 6.5

We're happy to announce Kiwi TCMS version 6.5! This is a minor security, improvement and bug-fix update that includes new versions of Django and other dependencies, removes some database fields, includes backend API updates and fixes several bugs. You can explore everything at https://public.tenant.kiwitcms.org!

Together with this release we announce:

Both of these are implemented in Python and should work on standard TAP and junit.xml files generated by various tools!

Additionally 3 more plugins are currently under development by contributors:

Supported upgrade paths:

5.3   (or older) -> 5.3.1
5.3.1 (or newer) -> 6.0.1
6.0.1            -> 6.1
6.1              -> 6.1.1
6.1.1            -> 6.2 (or newer)

Docker images:

kiwitcms/kiwi       latest  7ca4fda602fc    1.002 GB
kiwitcms/kiwi       6.2     7870085ad415    957.6 MB
kiwitcms/kiwi       6.1.1   49fa42ddfe4d    955.7 MB
kiwitcms/kiwi       6.1     b559123d25b0    970.2 MB
kiwitcms/kiwi       6.0.1   87b24d94197d    970.1 MB
kiwitcms/kiwi       5.3.1   a420465852be    976.8 MB

Changes since Kiwi TCMS 6.4

Security

  • Better override of SimpleMDE markdown rendering to prevent XSS vulnerabilities in SimpleMDE

Improvements

  • Update patternfly to version 3.59.1
  • Update bleach from 3.0.2 to 3.1.0
  • Update django-vinaigrette from 1.1.1 to 1.2.0
  • Update django-simple-history from 2.6.0 to 2.7.0
  • Update django-grappelli from 2.12.1 to 2.12.2
  • Update mysqlclient from 1.3.14 to 1.4.1
  • Update psycopg2 from 2.7.6.1 to 2.7.7
  • Update pygithub from 1.43.4 to 1.43.5
  • Convert TestCase page to Patternfly
    • page menu is under ... in navigation bar
    • Test plans card is missing the old 'add plan' functionality b/c we are not at all sure if adding plans to test cases is used at all. Can bring it back upon user request!
    • Bugs card is missing the add/remove functionality for b/c we are not quite sure how that functionality is used outside test runs!
  • Convert new TestCase page to Patternfly and provide Given-When-Then text template. This prompts the author to use a BDD style definition for their scenarios. We believe this puts the tester into a frame of mind more suitable for expressing what needs to be tested
  • Add a favicon. Fixes Issue #532
  • Sort Component, Product and Version objects alphabetically. Fixes Issue #633
  • Search test case page now shows Components and Tags
  • Search test case page now allows filtering by date. Fixes Issue #715
  • Search test case page now uses radio buttons to filter by automation status
  • Small performance improvement when searching test plans and test cases
  • Search test run page now allows to filter by Product but still continue to display all Builds in the selected Product
  • Updated doc-string formatting for some tcms modules

Database migrations

Known issues: on our demo installation we have observed that permission labels were skewed after applying migrations. The symptom is that labels for removed models are still available, labels for some models may have been removed from groups/users or there could be permission labels appearing twice in the database.

This may affect only existing installations, new installations do not have this problem!

We are not certain what caused this but a quick fix is to remove all permissions from the default Tester group and re-add them again!

  • Remove TestCase.alias
  • Remove TestCaseRun.running_date
  • Remove TestCaseRun.notes
  • Remove TestCase.is_automated_proposed
  • Remove TestCaseText model, merge into TestCase.text field. Closes Issue #198
  • Remove Priority.sortkey
  • Remove Build.description
  • Remove Classification.sortkey and Classification.description
  • Convert TestCase.is_automated from int to bool
  • Rename TestCaseRun.case_run_status to status

API

  • New method TestCaseRunStatus.filter()
  • New method Product.create()
  • New method Classification.filter()
  • New method BugSystem.filter()
  • Changes to TestCase.add_component():
    • now accepts component name instead of id
    • now fails if trying to add components linked to another Product.
    • now returns serialized TestCase object

Translations

Bug fixes

  • Fix for missing migrations from django-simple-history, see DSH #512 and StackOverflow #54177838
  • Fix cloning of test cases by surrounding bootstrap-selectpicker call with try-catch. Fixes Issue #695
  • Fix a traceback with TestRun report page when the RPC connection to Bugzilla can't be established

Refactoring

  • Remove unused form classes, methods, fields and label attributes
  • Remove unused or duplicate methods from TestCase model
  • Remove useless methods from BaseCaseForm()
  • Add test for discovering missing migrations
  • Add test for sanity checking PyPI packages which will always build tarball and wheel packages

tcms-api 5.2 (30 Jan 2019)

  • Add plugin_helpers.Backend which implements our test runner plugin specification in Python
  • Add dependency to kerberos (Aniello Barletta)

How to upgrade

If you are using Kiwi TCMS as a Docker container then:

cd Kiwi/
git pull
docker-compose down
docker pull kiwitcms/kiwi
docker pull centos/mariadb
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate

Don't forget to backup before upgrade!

WARNING: kiwitcms/kiwi:latest and docker-compose.yml will always point to the latest available version! If you have to upgrade in steps, e.g. between several intermediate releases, you have to modify the above workflow:

# starting from an older Kiwi TCMS version
docker-compose down
docker pull kiwitcms/kiwi:<next_upgrade_version>
edit docker-compose.yml to use kiwitcms/kiwi:<next_upgrade_version>
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate
# repeat until you have reached latest

Happy testing!

Kiwi TCMS is going to FOSDEM 2019

Hello testers, Kiwi TCMS is going to FOSDEM this year. This is where you can find us:

Kiwi TCMS sticker

We would like to meet with all of you and talk about test management and test process organization. In case you are stuck for crazy ideas checkout our project mission for inspiration.

Be part of the community

We are turning 10 years old and we have presents for you! You will have to perform a small challenge and you can get your hands(errr, feet) on a pair of these:

Kiwi TCMS socks

Here's what else you can do to help us:

Happy testing!

Hello testers, Kiwi TCMS has taken on a brave new mission! We would like to transform the testing process by making it more organized, transparent & accountable for everyone on your team. Our goal is to improve engineering productivity and participation in testing. The following blog post outlines how we would like to achieve this and what goals we put before ourselves for this year.

Complete the internal refactoring

Last year we took on the challenge to bring a legacy code base up to modern coding standard. We did not complete that effort but made very good progress along the way. This is not a small task and that's why our team will continue with it this year.

CodeClimate report

  • CodeClimate: 0 issues, 0% technical debt, health score A
  • Scrutinizer: only A and B type issues
  • Pylint: 0 issues
  • Remove vendored-in Handlebars, jQuery, jQuery-UI and TableDnD JavaScript libraries in favor of existing npm dependencies
  • Front-end uses the existing JSON-RPC instead of backend views that are only used for AJAX requests. Tip: these are usually accessed via postToURL() and jQ.ajax() on the front-end
  • Inspect and classify all 3rd party issues reported from Coverity and Bandit. Report and fix what we can, ignore the rest that do not affect Kiwi TCMS.

Redesign the UI templates with the help of Patternfly

There are 59 templates remaining to be converted to a modern look and feel. Along with them comes more refactoring and even redesign of the existing pages and the workflow around them. Together with refactoring this will make Kiwi TCMS easier to use and also to maintain.

Modernize reporting

We are planning to remove the existing reports feature because they are not well designed. We will re-implement existing functionality that our community finds useful, add new types of reports (incl. nicer graphics and UI) and make it possible for the reporting sub-system to be more easily extendable.

Phase out is planned to begin after 1st March 2019! Until then we are looking for your feedback. Please comment in Issue #657!

Plugins for 3rd party test automation frameworks

These will make it easier to collect results from automated test suites into Kiwi TCMS for later analysis. Instead of creating scripts that parse the results and talk to our API you will only have to install an additional package in your test environment and configure the test runner to use it! Automation test results will then appear inside Kiwi TCMS.

If you would like to use such functionality leave your vote inside GitHub issues! In case you would like to write a test-runner plugin you can find the specification here.

Redefine bug-tracker integration

Question: Does Kiwi TCMS integrate with JIRA?

Answer: Well, it does. How exactly do you want to integrate?

... silence ...

The following dialog happens every time someone asks me about bug-tracker integration, especially with JIRA. The thing is integration is a specified set of behavior which may or may not be desired in a particular team. As of now Kiwi TCMS is able to open a URL to your bug-tracker with predefined field values, add comments to bug reports and report a simple summary of bugs inside a TestRun.

We recognize this may not be enough and together with the community we really need to define what bug tracker integration means! The broader domain of application lifecycle management tools (of which TCMS is a sub-set) have an integrated bug tracking system. We can add something like this and save you the trouble of using JIRA, however many teams have already invested in integrating their infrastructure or just like other tools. For example we love GitHub issues and our team regularly makes public reports about issues that we find internally!

GitHub flow integration

Developers have their GitHub PR flow and if they have done the job of having unit tests then they will merge only when things are green! This leaves additional testing efforts kind of to the side and doesn't really help with transparency and visibility. I'm not going to mention having an automatically deployed staging environment for every change because very few teams actually have managed to do this effectively.

Kiwi TCMS statuses on GitHub PR

  • Goal: Figure out how Kiwi TCMS can integrate with GitHub flow and bridge the gap. Please share and +1 your wildest ideas in Issue #700.
  • Follow up: depending on the results in #700 we will follow with other goals and sub-tasks

Agile integration with Trello

Speaking of modern engineering flow is your team truly agile? When and how do you plan your testing activities ? Before the devel sprint or afterwards? How many testers take part in refining product backlog and working on user stories?

Similar to GitHub flow lots of teams and open source projects are using Trello to effectively organize their development process. Testing should not be left behind and Kiwi TCMS may be able to help.

  • Goal: Figure out how Kiwi TCMS fits into the overall devel-test-planning process for agile teams and what we can do to make this easier for testers. Please share and +1 your wildest ideas in Issue #701
  • Follow up: depending on the results in #701 we will follow with other goals and sub-tasks

Improve engineering productivity

What makes a test engineer productive when they need to assess product risk and new features, when mapping product requirements documents (PRD) to test plans and test cases, when collaborating on user stories and behavior specification ? What makes developers, product owners, designers and other professionals productive when it comes to dealing with testing ?

For example consider the following workflow:

  • Company has idea for a new product
  • In case this is a big product it may have its own mission, i.e. what kind of problem is it trying to solve and for which group of customers
  • Product backlog is then created which outlines features that map to the product mission
  • Then the team, together with test engineers perform example mapping and discuss and refine the initial feature requirements. User stories are created
  • Behavior specification may also be created
  • Test plans and test cases are the immediate product of BDD specs and desired user stories

Later we iterate through the sprints and for each sprint something like this happens:

  • Desired product features are planned for development. They must be complete at least in terms of requirements, specs and tests
  • Devel writes code, maybe some unit tests, testers can also write automated tests and/or manually verify the current state of the feature being developed
  • Testing, including exploratory is performed before feature is merged
  • Rinse and repeat

Devel is also part of testing, right? Product owners, UX and interaction designers as well. Producing quality software product is a team effort!

In every step of the way Kiwi TCMS can provide notification wizards, guidelines and/or documentation for best practices, facilitate tooling, e.g. to write user stories and assess them or map out an exploratory testing session, etc. The list of ideas is virtually endless. We can even go into deep learning, AI and blockchain but honestly who knows how to use them in testing ?

Our team is not quite sure how this goal will look like 3 months from now but we are certain that testing needs to happen first, last and all the time during the entire software development lifecycle. By providing the necessary functionality and tools in Kiwi TCMS we can boost engineering productivity and steer the testing process in your organization into a better, more productive direction which welcomes participation from all engineering groups.

Let's consider another point of view: testing is a creative activity which is benefited by putting your brain into a specific state of mind! For example Gherkin (the Given-When-Then language) has the benefit of forcing you to think about behavior and while doing so you are vocalizing the various roles in the system, what kind of actions are accepted and what sort of result is expected! Many times this will help you remember or discover missing scenarios, edge cases and raise even more questions!

Crazy ideas, brain dumps and +1 as always are welcome in Issue #703.

Community

Coding alone is not fun! Here's what you can do to help us:

We are also looking to expand our core team and the list of occasional contributors. The following are mostly organizational goals:

  • Goal: participate in 5 conferences with a project stand
  • Goal: define how we find, recruit and onboard new team members. The foundation is already set in TP-3
  • Goal: clearly mark GitHub issues which are suitable for external contributors which don’t want to spend lots of time learning how Kiwi TCMS works under the hood. We're going to tag all such issues with the GitHub help wanted label

Development policy

Our team will be working on areas related to the goals above. A +1 reaction on GitHub issues will help us prioritize what we work on!

GitHub +1

Bug fixes and other issues will be occasionally slipped into the stream and pull requests from non-team contributors will be reviewed and merged in a timely fashion.

There is at least 1 full day of work that goes behind the scenes when a new version is officially released: compile changelog, build images and upload them, create blog post and newsletter announcement, share on social media, etc. We also deploy on our own Kiwi TCMS instance as a stop-gap measure before making everything public!

New PyPI tarballs and Docker images will be released every few weeks as we see fit, this has been our standard process. We try to align releases with Django's release schedule and try to cut a new version when there are known security vulnerabilities fixed. However we can't guarantee this will always be the case!

If you are in a hurry and need something quickly the best option is to send a pull request, build your own Docker image from source and maybe consider sponsoring us via Open Collective!

Happy testing!

Kiwi TCMS 6.4

We're happy to announce Kiwi TCMS version 6.4! This is a security, improvement and bug-fix update that includes new versions of Django, Patternfly and other dependencies. You can explore everything at https://public.tenant.kiwitcms.org!

Supported upgrade paths:

5.3   (or older) -> 5.3.1
5.3.1 (or newer) -> 6.0.1
6.0.1            -> 6.1
6.1              -> 6.1.1
6.1.1            -> 6.2 (or newer)

Docker images:

kiwitcms/kiwi       latest  39fcb88182bb    963.4 MB
kiwitcms/kiwi       6.2     7870085ad415    957.6 MB
kiwitcms/kiwi       6.1.1   49fa42ddfe4d    955.7 MB
kiwitcms/kiwi       6.1     b559123d25b0    970.2 MB
kiwitcms/kiwi       6.0.1   87b24d94197d    970.1 MB
kiwitcms/kiwi       5.3.1   a420465852be    976.8 MB

Changes since Kiwi TCMS 6.3

Security

  • Update Django from 2.1.4 to 2.1.5, which deals with CVE-2019-3498: Content spoofing possibility in the default 404 page
  • Update Patternfly to version 3.59.0, which deals with XSS issue in bootstrap. See CVE-2018-14041
  • By default session cookies will expire after 24 hours. This can be controlled via the SESSION_COOKIE_AGE setting. Fixes Issue #556

Improvements

  • Update mysqlclient from 1.3.13 to 1.3.14
  • Update python-gitlab from 1.6.0 to 1.7.0
  • Update django-simple-history from 2.5.1 to 2.6.0
  • Update pygithub from 1.43.3 to 1.43.4
  • New API method TestCase.remove(). Initially requested as SO #53844380
  • Drop down select widges in Patternfly pages are now styled with bootstrap-select giving them more consistent look and feel with the rest of the page (Anton Sankov)
  • Create new TestPlan page now includes toggles to control notifications and whether or not the test plan is active. This was previously available only in edit page (Anton Sankov)
  • By default TestPlan notification toggles are turned on. Previously they were off (Anton Sankov)
  • Create and Edit TestPlan pages now look the same (Anton Sankov)
  • Kiwi TCMS is now accepting donations via Open Collective

Removed functionality

  • Remove TestPlan page -> Run menu -> Add cases to run action. This is the same as TestRun page -> Cases menu -> Add action
  • Legacy reports will be removed after 1st March 2019. Provide your feedback in Issue #657
  • The /run/ URL path has been merged with /runs/ due to configuration refactoring. This may break your bookmarks or permalinks!

Bug fixes

  • Don't traceback if markdown text is None. Originally reported as SO #53662887
  • Show loading spinner when searching. Fixes Issue #653
  • Quick fix: when viewing TestPlan cases make TC summary link to the test case. Previously the summary column was a link to nowhere.

Refactoring

  • Pylint fixes
  • New and updated internal linters
  • Refactor testplans.views.new to class based view (Anton Sankov)
  • Refactor TestCase -> Bugs tab -> Remove to JSON-RPC. References Issue #18
  • Refactor removeCaseRunBug() to JSON-RPC, References Issue #18
  • Remove unused render_form() methods
  • Remove unnecessary string-to-int conversion (Ivaylo Ivanov)
  • Remove obsolete label fields. References Issue #652 (Anton Sankov)
  • Remove JavaScript that duplicates requestOperationUponFilteredCases()
  • Remove QuerySetIterationProxy class - not used anymore

How to upgrade

If you are using Kiwi TCMS as a Docker container then:

cd Kiwi/
git pull
docker-compose down
docker pull kiwitcms/kiwi
docker pull centos/mariadb
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate

Don't forget to backup before upgrade!

WARNING: kiwitcms/kiwi:latest and docker-compose.yml will always point to the latest available version! If you have to upgrade in steps, e.g. between several intermediate releases, you have to modify the above workflow:

# starting from an older Kiwi TCMS version
docker-compose down
docker pull kiwitcms/kiwi:<next_upgrade_version>
edit docker-compose.yml to use kiwitcms/kiwi:<next_upgrade_version>
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate
# repeat until you have reached latest

Happy testing!

Roadmap status report for 2018

Hello everyone, in this article I will outline the progress that the Kiwi TCMS team has made towards achieving the goals in our 2018 roadmap (mid-year update here). TLDR; goals are completed at 62%. Refactoring legacy code is showing good results, less so on the front-end side and there are items still in progress!

Make code easier to maintain

Status: good progress

Initially CodeClimate reported a "D" rating with 600+ code smells and 600+ duplications and a 1 year estimation to resolve these. We're now down to "C" rating with 171 smells and 203 duplications.

The level of technical debt has dropped from 32.5% down to 17.7% and we have removed around 14000 lines of Python code and 8000 lines of JavaScript code without losing significant functionality.

Checkout the stats for more info!

Use pylint and pylint-django

Status: almost finished

Both pylint and pylint-django have been integrated into our CI workflow. There are even some custom built plugins that we use. The number of issues reported is down to 100 from 4000+ initially. These are predominantly fixme comments which are also in parts of the code that are scheduled for removal and refactoring.

Render HTML, return JSON

Status: moderate progress

Several views were modified to return pure JSON but we've not done any targeted work to resolve this issue. A number of other views have been removed in favor of using the existing JSON-RPC layer.

This is an internal refactoring effort which isn't very visible from the outside. This is also one of the factors contributing to the high number of removed source code.

Submit forms, post JSON, GET clean URLs

Status: no progress

Not much has been done in this area except the occasional refactoring to JSON-RPC.

API layer

Status: complete

Documentation

Status: moderate progress, dropped

All RPC methods have been documented! The rest of the internals will be documented as we go along.

No vendored JavaScript libraries

Status: good progress

We still carry around jQuery, jQuery-UI and Handlebars.js. They will be removed once the pages using them are converted to use the Patternfly widgets library.

Less HTML templates with better organization

Status: moderate progress

There are still over 50 HTML templates in tcms/templates/ that need to be refactored into Patternfly. We've been working on them one at a time and will focus more on this effort in the next couple of months.

Modern interface with Patternfly

Status: moderate progress

Some of the pages have been converted to use Patternfly. The most important pages that still have a different look and feel are TestPlan view, TestCase view and TestRun view. These are also the hardest to convert because they have lots of tabs/components which pull information from various places. Our goal is to create reusable widgets for the various components (e.g. a list of TestCases) and then include these components into several different templates to minimize code duplication.

JavaScript updates and front-end testing

Status: moderate progress

A number of JavaScript functions have been refactored and removed during the past few releases but there are still thousands of lines of code left to deal with. This effort is mostly happening in parallel with the Patternfly redesign. We still don't have anything to test front-end JavaScript functionality!

Community efforts

Status: good progress

We are seeing a steady stream of new users registered on https://public.tenant.kiwitcms.org and there are several active contributors on GitHub. Most of our translators are very active and keep their respective languages fresh and up to date!

Kiwi TCMS was represented at OSCAL Tirana, DjangoCon Heidelberg, PyCon Prague, HackConf Sofia, PiterPy St. Petersburg and OpenFest Sofia. We've also been approved for a project stand at FOSDEM 2019 so watch this blog for more news.

Happy testing!

Kiwi TCMS 6.3

We're happy to announce Kiwi TCMS version 6.3! This is a medium severity security update that includes new versions of Django and Patternfly, new database migrations, lots of improvements, bug fixes and internal refactoring. This version also introduces integration with GitLab issue tracker! You can explore everything at https://public.tenant.kiwitcms.org!

Supported upgrade paths:

5.3   (or older) -> 5.3.1
5.3.1 (or newer) -> 6.0.1
6.0.1            -> 6.1
6.1              -> 6.1.1
6.1.1            -> 6.2 (or newer)

Docker images:

kiwitcms/kiwi       latest  8135624fdca2    960.3 MB
kiwitcms/kiwi       6.2     7870085ad415    957.6 MB
kiwitcms/kiwi       6.1.1   49fa42ddfe4d    955.7 MB
kiwitcms/kiwi       6.1     b559123d25b0    970.2 MB
kiwitcms/kiwi       6.0.1   87b24d94197d    970.1 MB
kiwitcms/kiwi       5.3.1   a420465852be    976.8 MB

Changes since Kiwi TCMS 6.2.1

Security

  • Resolve medium severity XSS vulnerability which can be exploited when previewing malicious text in Simple MDE editor. See CVE-2018-19057, SNYK-JS-SIMPLEMDE-72570
  • Use mozilla/bleach before rendering Markdown to the user as a second layer of protection against the previously mentioned XSS vulnerability

Improvements

  • Update to Django 2.1.4
  • Update to Patternfly 3.58.0
  • Make docker container restartable (Maik Opitz, Adam Hall)
  • Add GitLab issue tracker integration. Fixes Issue #176 (Filipe Arruda, Federal Institute of Pernambuco)
  • Convert Create new TestPlan page to Patternfly (Anton Sankov)
  • Upon successful registration show the list of super-users in case new accounts must be activated manually. This can be the same or expanded version of the addresses in the ADMIN setting. Include super-users in email notifications sent via tcms.signals.notify_admins().
  • Don't include admin/js/*.js files in templates when not necessary. Results in faster page load. Fixes Issue #209
  • Enable nl2br Markdown extension which allows newline characters to be rendered as <br> tags in HTML. Visually the rendered text will look closer to what you seen in the text editor. Fixes Issue #623
  • Use auto-complete for adding components to TestCase

Removed functionality

  • Bulk-update of Category for selected TestCase(s) inside of TestPlan
  • Bulk-update of Components for selected TestCase(s) inside of TestPlan
  • Bulk-update of automated status for selected TestCase(s) inside of TestPlan
  • Bulk-remove for TestCase Component tab

These actions have always been a bit broken and didn't check the correct permission labels. You can still update items individually!

  • Selection of Components when creating new TestCase. Closes Issue #565. Everywhere else Kiwi TCMS doesn't allow selection of many-to-many relationships when creating or editing objects. Tags, Bugs, Components, TestPlans can be added via dedicated tabs once the object has been saved.

Bug fixes

  • Hide KiwiUserAdmin.password field from super-user. Fixes Issue #610
  • Don't show inactive Priority. Fixes Issue #637
  • Don't traceback when adding new users via Admin. Fixes Issue #642
  • Teach TestRun.update() API method to process the stop_date field. Fixes Issue #554 (Anton Sankov)
  • Previously when reporting issues to Bugzilla, directly from a TestRun, Kiwi TCMS displayed the error Enable reporting to this Issue Tracker by configuring its base_url although that has already been configured. This is now fixed. See Stack Overflow #53434949

Database

  • Remove TestPlan.owner field, duplicates TestPlan.author

Translations

Refactoring

  • Remove fmt_queries(). Fixes Issue #330 (Anton Sankov)
  • Remove unused parameter from plan_from_request_or_none(). Refers to Issue #303 (Anton Sankov)
  • Remove ComponentActions() class. Fixes Issue #20
  • Convert lots of AJAX calls to JSON-RPC
  • Remove lots of unused Python, JavaScript and templates. Both after migration to JSON RPC and other leftovers
  • Pylint fixes (Alexander Todorov, Anton Sankov)

How to upgrade

If you are using Kiwi TCMS as a Docker container then:

cd Kiwi/
git pull
docker-compose down
docker pull kiwitcms/kiwi
docker pull centos/mariadb
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate

Don't forget to backup before upgrade!

WARNING: kiwitcms/kiwi:latest and docker-compose.yml will always point to the latest available version! If you have to upgrade in steps, e.g. between several intermediate releases, you have to modify the above workflow:

# starting from an older Kiwi TCMS version
docker-compose down
docker pull kiwitcms/kiwi:<next_upgrade_version>
edit docker-compose.yml to use kiwitcms/kiwi:<next_upgrade_version>
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate
# repeat until you have reached latest

Happy testing!

Kiwi TCMS 6.2.1

We're happy to announce Kiwi TCMS version 6.2.1! This is a small release that includes some improvements and bug-fixes. You can explore everything at https://public.tenant.kiwitcms.org!

Supported upgrade paths:

5.3   (or older) -> 5.3.1
5.3.1 (or newer) -> 6.0.1
6.0.1            -> 6.1
6.1              -> 6.1.1
6.1.1            -> 6.2 (or newer)

Docker images:

kiwitcms/kiwi       latest  24338088bf46    956.8 MB
kiwitcms/kiwi       6.2     7870085ad415    957.6 MB
kiwitcms/kiwi       6.1.1   49fa42ddfe4d    955.7 MB
kiwitcms/kiwi       6.1     b559123d25b0    970.2 MB
kiwitcms/kiwi       6.0.1   87b24d94197d    970.1 MB
kiwitcms/kiwi       5.3.1   a420465852be    976.8 MB

Changes since Kiwi TCMS 6.2

Improvements

Bug fixes

  • Fix InvalidQuery, field TestCase.default_tester cannot be both deferred and traversed using select_related at the same time. References Issue #346

Refactoring

  • Pylint fixes (Ivaylo Ivanov)
  • Remove JavaScript and Python functions in favor of existing JSON-RPC
  • Remove vendored-in js/lib/jquery.dataTables.js which is now replaced by the npm package datatables.net (required by Patternfly)

Translations

Misc

  • https://public.tenant.kiwitcms.org is using a new SSL certificate with serial number 46:78:80:EA:80:A4:FC:65:17:E4:59:EC:1D:C2:27:47
  • Version 6.2.1 has been published to PyPI to facilitate people who want to deploy Kiwi TCMS on Heroku. Important: PyPI package will be provided as a convenience for those who know what they are doing. Valid bugs and issues will be dealth with accordingly. As we do not deploy from a PyPI tarball we ask you to provide all the necessary details when reporting issues! If you have no idea what all of this means then stick to the official Docker images!

How to upgrade

If you are using Kiwi TCMS as a Docker container then:

cd Kiwi/
git pull
docker-compose down
docker pull kiwitcms/kiwi
docker pull centos/mariadb
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate

Don't forget to backup before upgrade!

WARNING: kiwitcms/kiwi:latest and docker-compose.yml will always point to the latest available version! If you have to upgrade in steps, e.g. between several intermediate releases, you have to modify the above workflow:

# starting from an older Kiwi TCMS version
docker-compose down
docker pull kiwitcms/kiwi:<next_upgrade_version>
edit docker-compose.yml to use kiwitcms/kiwi:<next_upgrade_version>
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate
# repeat until you have reached latest

Happy testing!

Test runner plugin specification

Happy Monday testers! Kiwi TCMS needs your help! We are looking for developers who wish to create plugins for popular test runners that will record test results in Kiwi TCMS! Initially we are looking for plugins for Python's unittest, Django and JUnit!

What is a test runner?

When working with automated testing you have several components:

  • A test module (or test script), e.g. test_models.py which contains tests for your software;
  • A test framework, e.g. Python nose, which provides the structure for test classes and methods and assert methods to use;
  • A test runner, which knows how to discover your test scripts, load them, execute the testing scenarios inside of them and report the results.

Very often all of the components above live together inside the testing framework but don't need to. For example the standard unittest module in Python provides a test runner but there are also nose and py.test and Django provides its own test runner that knows how to work with the database.

Workflow organization

Once you agree to writing a plugin we are going to create a separate GitHub repository where you will be granted write privileges making you an independent contributor to the Kiwi TCMS project!

Design and architecture of the plugin is up to you, following the practices established by the testing framework in question. You will also have to create a test suite for your plugin based on the specification below.

You are expected to use public.tenant.kiwitcms.org while working on the plugin and afterwards. This is known as eating your own dog food!

For Python we provide the tcms-api module which already takes care of the communications layer. For other languages you will have to create this layer or depend on other open source libraries that provide a XML-RPC or JSON-RPC client!

You can use this gist for inspiration!

Behavior Specification

Please use the comments section to discuss unclear behavior and missing scenarios!

    SUMMARY: Will use configuration file if it exists
    GIVEN: the file ~/.tcms.conf exists
    WHEN: plugin initializes
    THEN: the plugin will log an info message, read the file and
    THEN: configure TCMS_API_URL, TCMS_USERNAME, TCMS_PASSWORD
          variables with the respective values


    SUMMARY: Will use ENVIRONMENT if configuration file doesn't exist
    GIVEN: the file ~/.tcms.conf does not exists
    WHEN: plugin initializes
    THEN: the plugin will read configuration from environment and configure
          the following variables/class members:
          TCMS_API_URL, TCMS_USERNAME and TCMS_PASSWORD


    SUMMARY: Will exit if TCMS_API_URL not configured
    GIVEN: TCMS_API_URL variable is empty
    WHEN: plugin initializes
    THEN: log a warning message and exit
    AND: depending on the test runner framework set exist status 1


    SUMMARY: Will exit if TCMS_USERNAME not configured
    GIVEN: TCMS_USERNAME is empty
    WHEN: plugin initializes
    THEN: log a warning message and exit
    AND: depending on the test runner framework set exist status 1


    SUMMARY: Will exit if TCMS_PASSWORD not configured
    GIVEN: TCMS_PASSWORD is empty
    WHEN: plugin initializes
    THEN: log a warning message and exit
    AND: depending on the test runner framework set exist status 1


    SUMMARY: Will re-use existing TestPlan if configured
    GIVEN: TCMS_RUN_ID environment variable is not empty
    WHEN: plugin initializes
    THEN:  this will be the Current_TestRun record to which the plugin is
           going to add test execution results
    AND: Current_TestPlan document in which the plugin will
           search for test cases becomes Current_TestRun.plan


    SUMMARY: Will create new TestPlan & TestRun if TCMS_RUN_ID not configured
    GIVEN: TCMS_RUN_ID environment variable is empty
    THEN: plugin will create a new TestPlan in Kiwi TCMS with attributes:
        name='Automated test plan for %(product)'
        product='%(product)'
        product_version='%(version)'
        type='Unit'
    WHERE: %(product) is a placeholder for TCMS_PRODUCT==TRAVIS_REPO_SLUG==JOB_NAME
           %(version) is a placeholder for TCMS_PRODUCT_VERSION==TRAVIS_COMMIT==TRAVIS_PULL_REQUEST_SHA==GIT_COMMIT
    THEN: plugin will crate a new TestRun in Kiwi TCMS with attributes:
        summary='Automated test run ....'
        plan=Current TestPlan
        build='%(build)'
        manager=TCMS_USERNAME
    WHERE: %(build) is a placeholder for TCMS_BUILD==TRAVIS_BUILD_NUMBER==BUILD_NUMBER
    Environment variables are specified in:
    https://docs.travis-ci.com/user/environment-variables#default-environment-variables
    https://wiki.jenkins.io/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-belowJenkinsSetEnvironmentVariables

    SUMMARY: Will not create duplicate Product, Version & Build if they already exist
    GIVEN: TCMS_RUN_ID is not configured
    AND: %(product) exists
    AND: %(version) exists
    AND: %(build) exists
    WHEN: plugin tries to auto-create TestPlan and TestRun
    THEN: plugin will re-use %(product), %(version) and %(build) from the database
    AND: not try to auto-create them


    SUMMARY: Will auto-create Product, Version & Build if they don't exist
    GIVEN: TCMS_RUN_ID is not configured
    AND: %(product) doesn't exist
    AND: %(version) doesn't exist
    AND: %(build) doesn't exist
    WHEN: plugin tries to auto-create TestPlan and TestRun
    THEN: %(product), %(version) and %(build) be created automatically


    SUMMARY: Unit test names are added to TestPlan
    GIVEN: we have good plugin configuration
    WHEN: plugin loops over unit tests emitted by the test runner
    THEN: plugin will check Current_TestPlan for a TestCase with the same name
    AND: if test case doesn't exist in Current_TestPlan
    THEN: it will be added to Current_TestPlan
    hint: it is probably best to process all unit test results at the end!


    SUMMARY: Unit test names are added to TestRun
    GIVEN: we have good plugin configuration
    WHEN: plugin loops over unit tests emitted by the test runner
    THEN: plugin will check Current_TestRun for a TestCaseRun object which matches
          the current unit test name
    hint: (or Current_TestCase object from previous scenario, depending on implementation)
    AND: if such TestCaseRun doesn't exist in Current_TestRun
    THEN: it will be added to Current_TestRun
    hint: it is probably best to process all unit test results at the end!


    SUMMARY: Current_TestRun is updated with unit test results
    GIVEN: we have good plugin configuration
    WHEN: plugin loops over unit tests emitted by the test runner
    THEN: plugin will check Current_TestRun for a TestCaseRun object which matches
          the current unit test name
    hint: (or Current_TestCase object from previous scenario, depending on implementation)
    AND: if TestCaseRun object exists in Current_TestRun
    THEN: its status will be updated with the execution result coming from the test runner
    hint: it is probably best to process all unit test results at the end!

Happy testing!

Kiwi TCMS 6.2

We're happy to announce Kiwi TCMS version 6.2! This is a small release that removes squashed migrations from previous releases and includes a few improvements. You can explore everything at https://public.tenant.kiwitcms.org or find our info booth at OpenFest in Sofia during the weekend and do a live demo with the team!

Supported upgrade paths:

5.3   (or older) -> 5.3.1
5.3.1 (or newer) -> 6.0.1
6.0.1            -> 6.1
6.1              -> 6.1.1
6.1.1            -> 6.2 (latest)

Docker images:

kiwitcms/kiwi       latest  7870085ad415    957.6 MB
kiwitcms/kiwi       6.2     7870085ad415    957.6 MB
kiwitcms/kiwi       6.1.1   49fa42ddfe4d    955.7 MB
kiwitcms/kiwi       6.1     b559123d25b0    970.2 MB
kiwitcms/kiwi       6.0.1   87b24d94197d    970.1 MB
kiwitcms/kiwi       5.3.1   a420465852be    976.8 MB

Changes since Kiwi TCMS 6.1.1

Improvements

  • Update to Django 2.1.3
  • Update Apache config to print logs on the console. Fixes Issue #549
  • https://public.tenant.kiwitcms.org now allows email associations when logging via GitHub. If you have an existing account which shares the same email address with your GitHub profile you will be redirected to that account upon logging in via GitHub! This also resolves a problem where existing users trying to login via GitHub were presented with error message that their email exists in the database! Fixes Issue #573

Database

  • Remove old variants of squashed migrations from earlier releases

Translations

Refactoring

  • Update tcms.tests.factories.BugFactory (Ivaylo Ivanov)
  • Add test for tcms.testcases.views.group_case_bugs (Ivaylo Ivanov)
  • Pylint fixes (Ivaylo Ivanov)
  • Remove unused JavaScript and re-use the existing JSON RPC methods

How to upgrade

If you are using Kiwi TCMS as a Docker container then:

cd Kiwi/
git pull
docker-compose down
docker pull kiwitcms/kiwi
docker pull centos/mariadb
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate

Don't forget to backup before upgrade!

WARNING: kiwitcms/kiwi:latest and docker-compose.yml will always point to the latest available version! If you have to upgrade in steps, e.g. between several intermediate releases, you have to modify the above workflow:

# starting from an older Kiwi TCMS version
docker-compose down
docker pull kiwitcms/kiwi:<next_upgrade_version>
edit docker-compose.yml to use kiwitcms/kiwi:<next_upgrade_version>
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate
# repeat until you have reached latest

Subscription based online service

We are planning to convert https://public.tenant.kiwitcms.org into a subscription based service for people who don't want to bother installing Kiwi TCMS on their own systems and just want to use it for test collaboration with their team.

The income from this service will go towards covering operating costs and supporting the development team. Watch this blog for further announcements about this. Meanwhile you may share your thoughts via Issue #515.

Plans to remove deprecated functionality

TestRun.product_version will be removed from the database schema in favor of TestRun.plan.product_version! With the latest web interface it is not possible to select a product version different than the one selected in the Test Plan. Test runs should only be able to select product builds (after Issue #246 is fixed).

Kiwi TCMS 6.1.1

We're happy to announce Kiwi TCMS version 6.1.1! This release squashes database migrations and removes older migrations that have been squashed in previous releases, a few improvements and bug fixes. You can explore everything at https://public.tenant.kiwitcms.org.

Supported upgrade paths:

5.3   (or older) -> 5.3.1
5.3.1 (or newer) -> 6.0.1
6.0.1            -> 6.1
6.1              -> 6.1.1

Docker images:

kiwitcms/kiwi       latest  49fa42ddfe4d    955.7 MB
kiwitcms/kiwi       6.1.1   49fa42ddfe4d    955.7 MB
kiwitcms/kiwi       6.1     b559123d25b0    970.2 MB
kiwitcms/kiwi       6.0.1   87b24d94197d    970.1 MB
kiwitcms/kiwi       5.3.1   a420465852be    976.8 MB

Changes since Kiwi TCMS 6.1

Improvements

  • Dashboard will now show TestRuns which have test cases assigned to current user. Fixes Issue #520
  • API method TestRun.add_case() now returns a serialized TestCaseRun object. Previously this method returned None

Bug fixes

  • Don't show disabled Priority records in UI. Fixes Issue #334

Translations

Refactoring

  • Fix some pylint errors (Ivaylo Ivanov)

Database

  • Remove old squashed migrations for management, testplans, testcases and testruns apps
  • Squash the remaining migrations for management, testplans, testcases and testruns apps

How to upgrade

If you are using Kiwi TCMS as a Docker container then:

cd Kiwi/
git pull
docker-compose down
docker pull kiwitcms/kiwi
docker pull centos/mariadb
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate

Don't forget to backup before upgrade!

Subscription based online service

We are planning to convert https://public.tenant.kiwitcms.org into a subscription based service for people who don't want to bother installing Kiwi TCMS on their own systems and just want to use it for test collaboration with their team.

The income from this service will go towards covering operating costs and supporting the development team. Watch this blog for further announcements about this. Meanwhile you may share your thoughts via Issue #515.

Plans to remove deprecated functionality

TestRun.product_version will be removed from the database schema in favor of TestRun.plan.product_version! With the latest web interface it is not possible to select a product version different than the one selected in the Test Plan. Test runs should only be able to select product builds (after Issue #246 is fixed).

A friend from Red Hat sent me an email asking about Kiwi TCMS performance so I did an experiment to establish a baseline. For API requests I got 7.5 req/sec or 130 msec/req which is 1.5x slower than GitHub!

I used perf-script (see here) to measure that. The script takes the first 250 test cases from our test suite and on every execution creates a new TestPlan (1 API request), then creates new test cases (250 requests), adds cases to test plan (250 requests), creates new product build (1 API request), creates new TestRun (1 API request), adds test cases to test run (250 requests) and finally updates the statuses (250 requests).

A total of 1003 API requests are sent to Kiwi TCMS every time you start this script! An example is available at TR #567!

On localhost, running the development server (./manage.py runserver) with an SQLite database I got:

$ time python perf-script

real    2m6.450s
user    0m1.069s
sys     0m0.331s

$ time python perf-script

real    2m7.472s
user    0m1.057s
sys     0m0.342s

$ time python perf-script

real    2m9.368s
user    0m1.072s
sys     0m0.351s

$ time python perf-script

real    2m9.197s
user    0m1.050s
sys     0m0.353s

This measures at 120 msec/req or 7.85 req/sec!

public.tenant.kiwitcms.org is running on an AWS t2.micro instance (via docker-compose) with the default centos/mariadb image! No extra settings or changes. I used the same computer over a WiFi connection and a pretty standard home-speed Internet connection. Times are:

$ time python perf-script

real    2m18.983s
user    0m1.175s
sys     0m0.095s

$ time python perf-script

real    2m25.937s
user    0m1.156s
sys     0m0.108s

$ time python perf-script

real    2m24.120s
user    0m1.102s
sys     0m0.098s

$ time python perf-script

real    2m21.521s
user    0m1.154s
sys     0m0.091s

This measures at 140 sec/req or 7.05 req/sec!

Note: since I am using Python 3.6 I had to modify the file /opt/rh/rh-python36/root/lib64/python3.6/ssl.py to read:

# Used by http.client if no context is explicitly passed.
_create_default_https_context = _create_unverified_context # this disables HTTPS cert validation

The issue has been reported in RHBZ #1643454

Happy testing!

Kiwi TCMS 6.1

We're happy to announce Kiwi TCMS version 6.1! This release introduces new database migrations, internal updates and bug fixes. It is a small release designed to minimize the number of database migrations by squashing them together. You can explore everything at https://public.tenant.kiwitcms.org.

NOTE: there is the 6.0.1 release which resolves an upgrade problem caused by non-applied migrations which have been later squashed and released in the same release! It is best to jump through the intermediate releases to ensure a smooth upgrade!

Supported upgrade paths:

5.3   (or older) -> 5.3.1
5.3.1 (or newer) -> 6.0.1
6.0.1            -> 6.1

Docker images:

kiwitcms/kiwi       latest  b559123d25b0    970.2 MB
kiwitcms/kiwi       6.1     b559123d25b0    970.2 MB
kiwitcms/kiwi       6.0.1   87b24d94197d    970.1 MB
kiwitcms/kiwi       5.3.1   a420465852be    976.8 MB

Changes since Kiwi TCMS 6.0

Improvements

  • Update Jira from 1.0.10 to 2.0.0
  • Update to Patternfly 3.55.0
  • Use button instead of HTML link for deleting test plan (Oleg Kainov)
  • New middleware that will check missing settings. At the moment will only check Base URL configuration which often gets forgotten!

Bug fixes

  • Hot-fix for error caused by the API method TestRun.update. Error was initially reported on StackOverflow. This patch makes it possible to use the API without crashing however the TestRun.update method doesn't handle the stop_date field at the moment!

Translations

Refactoring

  • Fix pylint errors (Ivaylo Ivanov)
  • Remove unused TestRun.list and TestCase.list_confirmed methods
  • Remove unused plan_by_id_or_name() and is_int(). Fixes Issue #269

Database

  • Rename tcms.core.contrib.auth to tcms.kiwi_auth
  • Remove field user from TestCaseTag, TestRunTag and TestPlanTag models
  • Squash migrations for management app
  • Squash migrations for testcases app
  • Squash migrations for testplans app
  • Squash migrations for testruns app

How to upgrade

If you are using Kiwi TCMS as a Docker container then:

cd Kiwi/
git pull
docker-compose down
docker pull kiwitcms/kiwi
docker pull centos/mariadb
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate

Don't forget to backup before upgrade!

Subscription based online service

We are planning to convert https://public.tenant.kiwitcms.org into a subscription based service for people who don't want to bother installing Kiwi TCMS on their own systems and just want to use it for test collaboration with their team.

The income from this service will go towards covering operating costs and supporting the development team. Watch this blog for further announcements about this. Meanwhile you may share your thoughts via Issue #515.

Plans to remove deprecated functionality

TestRun.product_version will be removed from the database schema in favor of TestRun.plan.product_version! With the latest web interface it is not possible to select a product version different than the one selected in the Test Plan. Test runs should only be able to select product builds (after Issue #246 is fixed).

Kiwi TCMS team updates

I am happy to announce that our team is steadily growing! As we work through our roadmap, status update here, and on-board new team members I start to feel the need for a bit more structure and organization behind the scenes. I also wish for consistent contributions to the project (commit early, commit often) so I can better estimate the resources that we have!

I am also actively discussing Kiwi TCMS with lots of people at various conferences and generate many ideas for the future. The latest SEETEST in Belgrade was particularly fruitful. Some of these ideas are pulling into different directions and I need help to keep them under control!

Development-wise sometimes I lose track of what's going on and who's doing what between working on Kiwi TCMS, preparing for conferences and venues to promote the project, doing code review of other team members, trying not to forget to check-in on progress (especially by interns), recruiting fresh blood and thinking about the overall future of the project. Our user base is growing and there are days where I feel like everything is happening at once or that something needs to be implemented ASAP (which is usually true anyway)!

Meet Rayna Stankova in the role of our team coach! Reny is a director for Women Who Code Sofia, senior QA engineer at VMware, mentor with CoderDojo Bulgaria and a long-time friend of mine. Although she is an experienced QA in her own right she will be contributing to the people side of Kiwi TCMS and less so technically!

Her working areas will be planning and organization:

  • help us (re)define the project vision and goals
  • work with us on roadmaps and action plans so we can meet the project goals faster
  • help us (self) organize so that we are more efficient, including checking progress and blockers (aka enforcer) and meet the aforementioned consistency point
  • serve as our professional coach, motivator and somebody who will take care of team health (yes I really suck at motivating others)

and generally serving as another very experienced member of the team!

We did a quick brainstorming yesterday and started to produce results (#smileyface)! We do have a team docs space to share information (non-public for now, will open it gradually as we grow) and came up with the idea to use Kiwi TCMS as a check-list for our on-boarding/internship process!

I don't know how it will play out but I do expect from the team to self-improve, be inspired, become more focused and more productive! All of this also applies to myself, even more so!

Existing team members progress

Last year we started with 2 existing team members (Tony and myself) and 3 new interns (Ivo, Kaloyan and Tseko) who built this website!

Tony is the #4 contributor to Kiwi TCMS in terms of number of commits and is on track to surpass one of the original authors (before Kiwi TCMS was forked)! He's been working mostly on internal refactoring and resolving the thousands of pylint errors that we had (down to around 500 I think). This summer Tony and I visited the OSCAL conference in Tirana and hosted an info booth for the project.

Ivo is the #5 contributor in terms of numbers of commits. He did learn very quickly and is working on getting rid of the remaining pylint errors. His ability to adapt and learn is quite impressive actually. Last month he co-hosted a git workshop at HackConf, a 1000+ people IT event in Sofia.

Kaloyan did most of the work on our website initially (IIRC). Now he is studying in the Netherlands and not active on the project. We are working to reboot his on-boarding and I'm hoping he will find the time to contribute to Kiwi TCMS regularly.

From the starting team only Tseko decided to move on to other ventures after he contributed to the website.

Internship program

At Kiwi TCMS we have a set of training programs that teach all the necessary technical skills before we let anyone actively work on the project, let alone become a team member.

Our new interns are Denitsa Uzunova and Desislava Koleva. Both of them are coming from Vratsa Software Community and were mentors at the recently held CodeWeek hackathon in their home city! I wish them fast learning and good luck!

Happy testing!

We are happy to announce that OpenFest - the biggest open source conference in Bulgaria has provided an info booth for our project. This year the event will be held on 3rd and 4th of November at Sofia Tech Park!

Last time the team went to a conference together we had a lot of fun! Join us at OpenFest to learn more about Kiwi TCMS and have fun with us!

In case you are unable to visit Sofia, which you totally should, you can catch up with us in Russia until the end of the year:

Feel free to ping us at @KiwiTCMS or look for the kiwi bird logo and come to say hi. Happy testing!

Kiwi TCMS 6.0

We're happy to announce Kiwi TCMS version 6.0! This release introduces new database migrations, removal of environment properties in favor of tags, internal updates and bug fixes. You can explore everything at https://public.tenant.kiwitcms.org.

This release removes squashed migrations. Direct upgrades from versions < 5.3.1 to 6.0 will break without an intermediate upgrade to 5.3.1!

Docker images:

kiwitcms/kiwi       latest  cd087297f349    991.3 MB

Changes since Kiwi TCMS 5.3.1

Improvements

  • Update to Django 2.1.2 due to high severity security issue
  • Update to Patternfly 3.54.8
  • Tag objects are now shown in Admin panel
  • Add autocomplete when adding tags to TestRun via UI

Removed functionality

  • TestCase new and edit views no longer allow editing of tags. Tags can be added/removed from the Tags tab which also makes sure to properly account for permissions
  • Remove EnvGroup, EnvProperty and EnvValue models in favor of tags. Existing values and properties are converted into tags and automatically added to test runs!
  • Convert squashed database migrations to regular ones and remove older migrations. WARNING: upgrade from versions <= 5.3.1 to 6.0 will break without an intermediate upgrade to kiwitcms/kiwi:5.3.1 a420465852be.
  • Remove deprecated TestCase.estimated_time and TestRun.estimated_time. Fixes Issue #514

Backend API

  • No longer use product_version for TestRun.create. Fixes Issue #522
    • 'product' is no longer required
    • 'product_version' is no longer required
    • 'manager' and 'default_tester' can be usernames or IDs
  • TestCase.create no longer accepts 'tag' values
  • TestRun.add_tag and TestRun.remove_tag now return list of tags. Previously these methods returned None! This is the list of tags assigned to the TestRun that is being modified!

Bug fixes

  • Fix mismatched HTML tag in plan/get.html template (Oleg Kainov)
  • Don't use |slugify filter in templates which breaks HTML links with non-ASCII TestPlan names. Fixes Sentry KIWI-TCMS-38

Refactoring

  • Fix pylint errors (Ivaylo Ivanov, Anton Sankov)
  • Use existing JSON-RPC methods to add/remove tags via webUI and remove specialized backend methods that handled these requests. Also make sure to obey respective permissions

Translations

How to upgrade

If you are using Kiwi TCMS as a Docker container then:

cd Kiwi/
git pull
docker-compose down
docker pull kiwitcms/kiwi
docker pull centos/mariadb
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate

Don't forget to backup before upgrade!

Subscription based online service

We are planning to convert https://public.tenant.kiwitcms.org into a subscription based service for people who don't want to bother installing Kiwi TCMS on their own systems and just want to use it for test collaboration with their team.

The income from this service will go towards covering operating costs and supporting the development team. Watch this blog for further announcements about this. Meanwhile you may share your thoughts via Issue #515.

Plans to remove deprecated functionality

TestRun.product_version will be removed from the database schema in favor of TestRun.plan.product_version! With the latest web interface it is not possible to select a product version different than the one selected in the Test Plan. Test runs should only be able to select product builds (after Issue #246 is fixed).

Happy birthday Kiwi TCMS

1 year infographic

In this blog post I will show more ways to customize Kiwi TCMS by adding logging capabilities to the API backend. Indeed this is a feature that our team deemed not required for upstream and was removed in PR #436.

Start by creating the following directory structure:

    api_logging/
        __init__.py
        handlers.py
        models.py

This is a small Django application that will log every call to the API backend. Each file looks like this:

    # models.py contains DB schema for your new table
    from django.db import models
    from django.conf import settings

    class ApiCallLog(models.Model):
        executed_at = models.DateTimeField(auto_now_add=True)
        user = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, blank=True,
                                 on_delete=models.CASCADE)
        method = models.CharField(max_length=255)
        args = models.TextField(blank=True)

        def __str__(self):
            return "%s: %s" % (self.user, self.method)

Then

    # handlers.py overrides the RPC handlers coming from django-modernrpc
    from modernrpc import handlers

    from django.conf import settings
    from django.contrib.auth import get_user_model

    from .models import ApiCallLog

    def log_call(request, method_name, args):
        """ Log an RPC call to the database or stdout in DEBUG mode. """
        request_user = request.user
        if not request_user.is_authenticated:
            # create an anonymous user object for logging purposes
            request_user, _ = get_user_model().objects.get_or_create(
                username='Anonymous',
                is_active=False)

        if method_name is None:
            method_name = '--- method_name missing ---'

        if settings.DEBUG:
            print('API call:: user: {0}, method: {1}, args: {2}'.format(
                request_user,
                method_name,
                args))
        else:
            ApiCallLog.objects.create(
                user=request_user,
                method=method_name,
                args=str(args))

    class XMLRPCHandler(handlers.XMLRPCHandler):
        def process_request(self):
            encoding = self.request.encoding or 'utf-8'
            data = self.request.body.decode(encoding)
            params, method_name = self.loads(data)

            log_call(self.request, method_name, params)
            return super().process_request()

    class JSONRPCHandler(handlers.JSONRPCHandler):
        def process_single_request(self, payload):
            method_name = payload.get('method', None)
            params = payload.get('params')

            log_call(self.request, method_name, params)
            return super().process_single_request(payload)

NOTE: You will have to execute ./manage.py makemigrations api_logging to create the initial migration for Django. This could be easier if you place the above directory into existing Django application or craft the migration file by hand!

The last thing you want to do is create a local_settings.py file which will override Kiwi TCMS defaults:

    # local_settings.py
    from django.conf import settings

    settings.INSTALLED_APPS += [
        'api_logging',
    ]

    MODERNRPC_HANDLERS = ['api_logging.handlers.XMLRPCHandler',
                          'api_logging.handlers.JSONRPCHandler']

Then place everything in Dockerfile like so:

    FROM kiwitcms/kiwi

    COPY ./api_logging/ /venv/lib64/python3.6/site-packages/api_logging/
    COPY local_settings.py /venv/lib64/python3.6/site-packages/tcms/settings/

Kiwi TCMS will import your local_settings.py and enable the logging application. Now build your customized Docker image and use it for deployment!

Happy testing!

Kiwi TCMS 5.3.1

We're happy to announce Kiwi TCMS version 5.3.1! This release brings lots of UI updates and removal of unused and/or duplicated functionality and source code. Many pages have been redesigned with the Patternfly library to have a modern look and feel which you can experience at https://public.tenant.kiwitcms.org.

This will be the last release to carry around squashed migrations. In version 6.0 older migrations will be deleted and replaced with their squashed equivalents. Upgrades from versions < 5.3 to 6.0 will break without an intermediate upgrade to 5.3.1!

Use kiwitcms/kiwi:5.3.1 from Docker Hub when upgrading at some point in the future!

Docker images:

kiwitcms/kiwi        5.3.1               a420465852be        976.8 MB
kiwitcms/kiwi        latest              a420465852be        976.8 MB

Changes since Kiwi TCMS 5.2

Improvements

  • Update to Django 2.1.1
  • Update Patternfly version. Fixes Issue #381
  • Replace TinyMCE with SimpleMDE markdown editor. Used for TestPlan text and TestCase action, setup, breakdown, effect fields
  • Allow downstream builds to customize the login templates by providing registration/custom_login.html template. It can either override the entire login page or provide additional information inside the custom_login block!

Known issues

  • You may need to strip existing texts from HTML tags that were generated by TinyMCE. Either do this manually as you go along and use/edit records or in bulk via the API and tools like html2text. We strongly advise you to backup your database before attempting to automatically edit text fields!

Visual changes

  • Remove breadcrumbs at the top of pages. Only admin pages still have them
  • Convert login and registration templates to Patternfly. Fixes Issue #211
  • Convert 404 and 500 templates to Patternfly
  • Convert dashboard page to Patternfly
  • Convert TestRun new, edit and clone pages to Patternfly. Fixes Issue #17
  • Convert Search Test Plans page to Patternfly
  • Convert Search Test Runs page to Patternfly
  • Convert Search Test Cases page to Patternfly
  • TestPlan view page, Runs tab now re-uses the search form for test runs which is built using Patternfly
  • Added pagination controls to pages with search results

Removed functionality

  • When creating or editing TestRun
    • field estimated_time is scheduled for removal and is not shown
    • product_version is scheduled for removal in favor of TR.plan.product_version
    • Product & Version can't be edited anymore. Must be set on the parent TestPlan instead. Still allows to specify builds
  • Remove the ability to clone multiple TestPlans from search results
  • Remove the ability to upload TestPlan document files in favor of the existing API
  • Remove TestCase export to XML in favor of existing API
  • Remove Advanced Search functionality. Fixes Issue #448, Issue #108
  • Remove tech preview feature: Django Report Builder

Translations

Bug fixes

  • Don't use get_full_url() where not needed. Closes Issue #380
  • Remove unused templates. Fixes Issue #114
  • Submit filter form when clicking on tag value. Fixes Issue #426
  • Update TestCaseRun.tested_by when setting status. Fixes Issue #459
  • Add tests for KiwiUserAdmin. Closes Issue #489

Settings

  • The following settings have been removed MOTD_LOGIN, WELCOME_MESSAGE and TINYMCE_DEFAULT_CONFIG

Refactoring

  • Fix pylint errors (Anton Sankov, Ivaylo Ivanov)
  • Remove lots of unused functions and classes
  • Remove old or unnecessary templates
  • Remove html2text dependency
  • Remove unused CSS and vendored-in JavaScript libraries
  • Add JavaScript JSON-RPC client which is now used by the front-end to communicate with the existing JSON-RPC API on the back-end. This replaces many 'ajax' views which are only used to render the UI and were duplicating functionality with existing API
  • Non dist/ files are no longer removed from node_modules/ when building a docker image because packages like moment.js and bootstrap-datetimepicker.js don't ship their files in dist/
  • Convert TestPlans.TreeView to JSON RPC

How to upgrade

If you are using Kiwi TCMS as a Docker container then:

cd Kiwi/
git pull
docker-compose down
docker pull kiwitcms/kiwi
docker pull centos/mariadb
docker-compose up -d
docker exec -it kiwi_web /Kiwi/manage.py migrate

Don't forget to backup before upgrade!

Ask your questions on StackOverflow

Kiwi TCMS is now using the 'kiwi-tcms' tag on StackOverflow to track questions. Please submit your support requests and general questions to StackOverflow tagged with the 'kiwi-tcms' tag! Support requests via GitHub or email will not be answered anymore (GitHub issues are for bugs or feature discussions only)!

Subscription based online service

We are planning to convert https://public.tenant.kiwitcms.org into a subscription based service for people who don't want to bother installing Kiwi TCMS on their own systems and just want to use it for test collaboration with their team.

The income from this service will go towards covering operating costs and supporting the development team. Watch this blog for further announcements about this. Meanwhile you may share your thoughts via Issue #515.

Plans to remove deprecated functionality

TestRun.product_version will be removed from the database schema in favor of TestRun.plan.product_version! With the latest web interface it is not possible to select a product version different than the one selected in the Test Plan. Test runs should only be able to select product builds (after Issue #246 is fixed).

TestRun.estimated_time is scheduled for removal if not used. Objections and use-cases must be shared via Issue #514.

EnvGroup and EnvProperty models are scheduled for removal in favor of Tag. Internally tags are referenced in more places inside Kiwi TCMS' source code and they appear to be more fully developed. On the other hand while environment appears very similar to tags it is not exactly the same. Ongoing discussion is happening via Issue #484.

Newer Posts

Page 7 / 8

Older Posts