Skip to content

sweet-mustard/test-nurturer

Repository files navigation

test-nurturer

Build Version Downloads

The Test Nurturer IntelliJ-based plugin allows generating Test Mother classes. This plugin was inspired by the Mastering the Object Mother blog post of Jonas Geiregat.

After installing the plugin, you can generate a Test Mother via the Tools > Generate Test Mother menu item.

The plugin also contains an inspection that will warn if the Test Mother is missing fields that are present in the object that you create a Test Mother for.

The development of this plugin is proudly sponsored by Sweet Mustard.

Adding a new feature

  1. Create an issue in the issue tracker, or pick up one of the open issues. Assign yourself so it is clear somebody is working on it.
  2. Create a branch called feature/gh-xxx where xxx is the issue number on GitHub.
  3. Commit on the branch and push the branch.
  4. When done, update CHANGLELOG.md with information on the change you have done. Also make sure you are up-to-date with the latest changes on main.
  5. Open a pull request so the change can be reviewed.
  6. If the PR is approved, it will be merged to main and included in the next release.

Releasing a new version

  1. Ensure all PR's are merged into the main branch.
  2. Update pluginVersion in the gradle.properties file to have the correct version you want to release (unless it is already correct).
  3. Open the GitHub releases page. There should be a draft release there.
  4. Edit the draft release and press "Publish release". This will start the release workflow.
  5. When the release action is done, a pull request will be created with the changes to the CHANGELOG.md that will have the proper version filled in.
  6. Wait for the version to be approved by JetBrains. See https://plugins.jetbrains.com/plugin/23056-test-nurturer for the plugin page.
  7. Update pluginVersion in the gradle.properties file to have the next version you want to release.

Cleanup a release

If a release build for some reason fails, you need to do some or all of the following to clean up ( Depending on where exactly the release process failed):

  1. Remove the assets from the release using the gh CLI tool:
  • gh release delete-asset v2.0.0 test-nurturer-2.0.0.tar.gz
  • gh release delete-asset v2.0.0 test-nurturer-2.0.0.zip
  1. Delete the release from the GitHub releases page.
  2. Delete the version from the Jetbrains plugin page
  3. Remove the GIT branch for the changelog update (e.g. changelog-update-v2.0.0)

After that, you need to change something on the main branch to generate the draft release again, so you can retry the release.

Installation

  • Using the IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "test-nurturer" > Install

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...


Plugin based on the IntelliJ Platform Plugin Template.