Problem/Motivation

Add test coverage

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#3 3251165_tests_3.patch0 bytesdanielveza
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • 3251165-add-tests Comparechanges, plain diff MR !3
  • 2.0.x Comparecompare

Comments

xurizaemon created an issue. See original summary.

xurizaemon’s picture

DanielVeza, would you please visit https://www.drupal.org/node/2693767/qa and enable automated testing for MRs on the 2.0.x branch?

danielveza’s picture

StatusFileSize
new0 bytes

Out of time today but whipped up a patch for this as a starting point

  • DanielVeza committed 7a77a34 on 3251165-add-tests
    Issue #3251165 by xurizaemon, DanielVeza: Initial work on test coverage
    
danielveza’s picture

Status: Active » Needs review

0 byte patch oops. Done a proper commit now

Marking as NR for the testbot

xurizaemon’s picture

I clicked "open merge request" to see if that would kick the testbot off. Nope.

Let's use a checklist to work out what's missing!

https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or...

  1. Make sure the project has a development release.
  2. From the project page, click "Automated testing".
  3. Click Add test / retest.
  4. Make sure "new test" is selected. Select the Environment, Core version, and Schedule for testing, and save.
  5. Repeat these steps to set up additional schedules.

AFAICT this has been done - looks right to me.

Set up automated testing for:

  • The maintained branches of your project, usually weekly, against the latest compatible Core version. Sometimes things change in Drupal core that affect contributed projects, so this will test that your project continues to work with the latest version of Drupal core.
  • Patch testing ("Run on commit and for issues"), for each maintained branch. This will make it so when people upload patches or submit merge requests for your project, they will automatically trigger a run of the automated tests.

Is "Run on commit and for issues" the bit that needs flipping here? I can't see that UI, only maintainers can... I think?

Patches (and merge requests) are tested if:

  • You have set up automated testing for patches in this branch of your project.
  • The issue is set to "Needs Review" or " Reviewed and Tested By the Community." (For more information on status settings, see status settings for an issue.)
  • The patch file has a .patch or .diff extension, or a merge request is created.
  • The patch has not already failed testing; you can reset manually if you think something went wrong.
danielveza’s picture

Hmm. I checked "Run on commit and for issues" under New tests. Lets see what that does

xurizaemon’s picture

Status: Needs review » Needs work
xurizaemon’s picture

Status: Needs work » Needs review
xurizaemon’s picture

Yes! Testbot needed to see an update to the MR in order to wake up. (The other updates last night were me trying a couple of levers that might do it, but they weren't sufficient to appease the test deities.)

I've pushed some coding standards changes to the MR, these should make no changes to your initial tests proper - let's see how that goes :)

(I've got some local WIP which we can add to this also.)

xurizaemon’s picture

Additionally to the above - I had to click into the test and tell testbot it was OK to run the test, even though tests were failing on the target branch. Now we have a pass!

I have not yet actually reviewed the test, lol. But we have progress :)

liam morland made their first commit to this issue’s fork.

liam morland’s picture

Status: Needs review » Needs work

I rebased the test. The test runs but it fails, because of the change from term id to term uuid; see #3363916: 2.0.2 breaks backward compatibility.

Coding standards pass with the changes in this merge request. The coding standards fixes are also in #3372964: Minor phpcs issues. That is ready for commit.

Branch 3251165-add-tests on the main repo (not issue fork) should be deleted by the maintainer. It contains an older version of the code in the issue fork for this issue.

dieuwe’s picture

Have deleted that branch and merged the coding standards issue.

xurizaemon’s picture

Rebased

liam morland’s picture

Minor updates made. Now coding standards pass and tests run, but they do not pass.