Project

General

Profile

Plugins Directory » Redmine TestSuites

Author: Massimo Rossello
Website: https://github.com/maxrossello/redmine_testsuites
Code repository: https://github.com/maxrossello/redmine_testsuites.git
Registered on: 2019-02-05 (almost 6 years ago)
Current version: 5.0.7
Compatible with: Redmine 5.0.x
User ratings:   (0)

Allows to run the Redmine test suite along with plugin tests, considering the different behaviors introduced by supported plugins over the Redmine default behavior.

Furthermore, the plugin adds tasks to run byebug and minitest_bisect over the very same test list and test order as the plain test task.

Version

The plugin version corresponds to minimum version of Redmine required. Look at dedicated branch for each Redmine version.

Overview

Redmine tests often fail when plugins are installed, because the plugins change the default behavior of the system. Furthermore, the plugins tests can be executed separately from the core Redmine ones.

A better environment for plugin development would encompass running core tests along with plugin tests, against the expected modified behavior.

This plugin installs itself only if RAILS_ENV="test", but like other plugins, its rake tasks are always loaded. It does the following things:

  • replicates the core Redmine tests into its own plugin space, modified according to possibly modified behavior by the possible presence of supported plugins (see list below)
  • creates additional rails tasks for running plugin tests along with core tests:
    redmine:test : runs core tests along with all the plugins tests, except system tests (like redmine:test:all)
    redmine:test:all : runs all core tests along with all the plugins tests, except system tests
    redmine:test:functionals : run core functional tests along with plugins functional tests
    redmine:test:helpers: run core helpers tests along with plugins helpers tests
    redmine:test:integration : run core integration tests along with plugins integration tests
    redmine:test:routing : run core routing tests along with plugins routing tests
    redmine:test:units : run core unit tests along with plugins unit tests
    redmine:test:system : run core system tests along with plugins system tests

    Example:

      RAILS_ENV="test" bundle exec rails redmine:test:units TESTOPTS="--seed 45334" 
    

    or
      RAILS_ENV="test" bundle exec rails redmine:test:units SEED="45334" 
    

  • creates additional rails tasks for running minitest_bisect on same files selected by redmine:test tasks, by using the redmine:bisect prefix. Environment variable TESTOPTS can be used to pass additional arguments, for example the offending seed.

    Example:

      RAILS_ENV="test" bundle exec rails redmine:bisect:units TESTOPTS="--seed 45334" 
    

  • creates additional rails tasks for running byebug on same files selected by redmine:test tasks, by using the redmine:byebug prefix. Environment variable TESTOPTS can be used to pass additional arguments, for example the offending seed.

    Example:

      RAILS_ENV="test" bundle exec rails redmine:byebug:units TESTOPTS="--seed 45334" 
    

The Redmine core tests are cloned under the plugin itself and then modified. Every modified line is kept in commented form, so that a diff against the verbatim tests is easy.

The plugin repository comes with a tag for each supported Redmine core version.

Supported plugins

  • redmine_base_deface : integrate with the deface gem to manage view modifications in plugins
  • redmine_better_overview : provides a better projects overview
  • redmine_extended_watchers : make issues and containing project visible to non member watchers, and send change notifications to them
  • redmine_pluggable_themes : allows Redmine plugins to export themes in their assets
  • redmine_translation_terms : allows to customize specific terms in Redmine translations (e.g. issue -> work item, project -> workspace) in order to better adapt the issue tracker to a specific task
  • redwine : Redmine profile holding some enhancements and fixes encountered against the official Redmine release
  • sidebar_hide : adds simple hide button for sidebar of Redmine

How to support further plugins

  • Fork the github repository
  • Run "bundle exec rails redmine:test"
  • Edit failing tests: duplicate the offending line(s) and keep the original ones commented. The change shall encompass all cases of expected behaviors depending on whether all or a part of the supported plugins are installed or not. The presence of a plugin can be checked with:
      if Redmine::Plugin.installed? :my_plugin
          <expected behavior with my_plugin installed>
      else
          <expected behavior without my_plugin installed>
      end
    
  • Issue a merge request

Installation notes

Install this plugin into the Redmine plugins folder.

cd {redmine root}
git clone https://github.com/maxrossello/redmine_testsuites.git plugins/redmine_testsuites
bundle install

Finally restart your server.

Changelog

5.0.7 (2023-12-07)

Compatible with Redmine 5.0.x.

https://github.com/maxrossello/redmine_testsuites/releases/tag/testsuites-5.0.7

Supports Redmine 5.0.7.

Supported plugins:

  • redmine_translation_terms ~> 5.0.6
  • redmine_base_deface >= 1.6.2
  • redmine_better_overview ~> 5.0.2
  • redmine_extended_watchers ~> 5.0.2
  • redmine_pluggable_themes ~> 5.0.2
  • redwine = 5.0.7
  • sidebar_hide >= 5.0.2

5.0.6 (2023-10-21)

Compatible with Redmine 5.0.x.

https://github.com/maxrossello/redmine_testsuites/releases/tag/testsuites-5.0.6

Supports Redmine 5.0.6.

Supported plugins:

  • redmine_translation_terms ~> 5.0.6
  • redmine_base_deface >= 1.6.2
  • redmine_better_overview ~> 5.0.2
  • redmine_extended_watchers ~> 5.0.2
  • redmine_pluggable_themes ~> 5.0.2
  • redwine = 5.0.6
  • sidebar_hide >= 5.0.2

4.2.11 (2023-10-21)

Compatible with Redmine 4.2.x.

https://github.com/maxrossello/redmine_testsuites/releases/tag/testsuites-4.2.11

Supports Redmine 4.2.11.

Supported plugins:

  • redmine_translation_terms ~> 4.2.11
  • redmine_base_deface
  • redmine_better_overview ~> 4.2.0
  • redmine_extended_watchers ~> 4.2.0
  • redmine_pluggable_themes ~> 4.2.0
  • redmine_themes ~> 4.2.0
  • redwine = 4.2.11
  • sidebar_hide >= 4.2.0

3.4.8 (2019-02-06)

Compatible with Redmine 3.4.x.