I noticed there has been a recent change to how the testbot reports test results.

Some projects I contribute to have no test cases, but have the testbot turned on anyway. This helps the project maintainer because the testbot will check patches to ensure they apply and are free of coding standards errors. And of course this is a first step towards getting actual test cases committed, so it's not something we want to discourage.

Up until a few weeks ago, when there were no test cases the testbot would report something like "PHP 5.5 & MySQL 5.5, D8.7 No tests found" with a "green" status indicating the patch was successful. The issue status would remain at "Needs review".

Now, however, the testbot is reporting the same patch as "PHP 5.5 & MySQL 5.5, D8.7 Build Successful" which is NOT "green", and thus the testbot sets the issue status to "Needs work". This makes it appear like the test has failed! (See #2938963-3: Sender "Mime Mail mailer" fails without explanation for an example.)

This first started happening on 18 July 2018 - at https://www.drupal.org/pift-ci-job/1081420 you can see that on and before 17 July 2018 the testbot reported "No tests found", while on and after 18 July 2018 the testbot reported "Build Successful" and failed the test.

This is a regression from the behavior established in #2645590: Ensure that simpletest job doesn't "fail" testing if no tests are present , where the testbot was changed so that

projects with no tests will now return a "No tests Found" and be green if the build is successful

Can we go back to treating "Build Successful" as a "green" status? Marking this as a bug because "Build Successful" is not a failure.

Comments

TR created an issue. See original summary.

joseph.olstad’s picture

testbot says this core patch failed, but there are no failures.

and the message is BUild successful (with no results), but have a look at the console output.
https://www.drupal.org/project/drupal/issues/2878046#comment-12785748

damienmckenna’s picture

I'm hitting this problem with Backup Migrate too, most of its branch tests are indicating that they fail because of this, even though the actual code tests pass.

joseph.olstad’s picture

Priority: Normal » Critical
Status: Active » Needs work

This needs attention.

damienmckenna’s picture

Status: Needs work » Active
damienmckenna’s picture

Priority: Critical » Major

Setting it to "major" as there's no dataloss involved.

damienmckenna’s picture

This just hit Metatag's branch tests too. Dagnammit.

joseph.olstad’s picture

ya it's everywhere, someone ping Dries.

liam morland’s picture

Tests are failing with "Build Successful" even if they have tests. #3001981: Tests fail with "Build Successful" message

jyraya’s picture

Hello,

I experienced the same issue.
Can someone confirm that is a CI related issue?

I notice that my colleague that pushed previously a patch on the same issue, did receive a full green when he tested against PHP 5.3 & MySQL 5.5 while I tested against PHP 7 & MySQL 5.5 and PHP 5.6 & MySQL 5.5.

joseph.olstad’s picture

Project: DrupalCI: Drupal.org Testing Infrastructure » DrupalCI: Test Runner
Component: Miscellaneous » Documentation

This was in the wrong queue, that is why we get no response.

joseph.olstad’s picture

Related issues: +#2997871: D7 testing broken
tr’s picture

This was in the wrong queue, that is why we get no response.

Well there's another, more recent, issue in this new queue for the same problem - #2990849: Test runner reports failure when contrib project has no automated tests but automated testing is enabled. That other issue has also been open for a long time with no response, so I'd have to say that 'wrong queue' is not the reason. Or at the very least this new queue is clearly not the 'right' one if you want to get a response.

The reason I opened the issue in https://www.drupal.org/project/drupalci is because the description for that project says:

This project is intended as the primary issue queue for discussing DrupalCI, the testing infrastructure for drupal.org. It is the first place for opening testing issues so they can be triaged into their proper sub queue

So I think you've moved it to the wrong place - it should stay where it was.

joseph.olstad’s picture

Component: Documentation » Testrunner Tests

The person responsible for the Drupal.org testing infrastructure is Mixologic , I recommend someone here please contact him

joseph.olstad’s picture

FYI: I sent a message to Mixologic
I'm not sure who else works with him on this, I imagine he's with Aquia?

joseph.olstad’s picture

this is an important issue because like me, a lot of maintainers rely on the automated testing system, it automatically filters out broken patches in issue queues and provides valuable debugging information for the community .

Basically my maintainer work is pretty much halted until this gets fixed.

tr’s picture

Issue summary: View changes
joseph.olstad’s picture

this might have been fixed, can anyone else please confirm?

liam morland’s picture

Webform is still failing with "Build Successful".

jyraya’s picture

Hello,

I triggered a retest on the last patch of the #1657886: Filter "Convert URLs into links" doesn't support multilingual web addresses issue, using PHP 5.6 & MySQL 5.5 and PHP 7 & MySQL 5.5.

Both are green: PHP 5.6 & MySQL 5.5 2,042 pass PHP 7 & MySQL 5.5 2,042 pass.

joseph.olstad’s picture

This still affects some contrib as mentioned by Liam (webforms) , I just checked Panels.

Can pinpoint when this issue started, September 19th 2018 to be exact. Last known working state, September 18th 2018.

see panels automated tests:
https://www.drupal.org/pift-ci-job/1082840

Mixologic’s picture

Assigned: Unassigned » Mixologic

I think I may have fixed this this morning.

The issue was that coder created a new, backwards incompatible release, which everything started using (8.3.1). I've reverted drupalci to use 8.2.12 and it has fixed some of the problems people were seeing with phpcs failing to run.

However, that is only half of the issue, and separate from the original one that TR is reporting.

When a build has no tests it used to work, but we had to upgrade jenkins, and the plugin we were relying on to allow a 'no tests build' to pass was broken in the upgrade (rather it insisted on absolutely valid XML for a non-existant xml spec), so we reverted to the other junit processing plugin.

However, I had forgotten that the other junit plugin fails when there are no tests, so, Im currently working on a fix for how to make a 'no tests' build still pass.

Sorry for the delays.

liam morland’s picture

Testing is now working for Webform and my other modules that I have tried.

joseph.olstad’s picture

appears to be working again, can others please confirm?

tr’s picture

However, that is only half of the issue, and separate from the original one that TR is reporting.
...
I'm currently working on a fix for how to make a 'no tests' build still pass.

As @Mixologic said in #23, the original issue, which started happening in July, is NOT fixed yet. But it does seem that the more recent problems that started in late September have been fixed, at least for the modules that I maintain.

joseph.olstad’s picture

cool, ya the problems I noticed started approximately September 19th,
it appears to be fixed now, I think we can mark this as fixed. I haven't looked into the other issue, doesn't seem to affect my stuff.

damienmckenna’s picture

I can confirm that the branch tests for at least some of the modules I comaintain are working correctly now, e.g. Date's tests ran fine this evening: https://www.drupal.org/pift-ci-job/1088139

Thanks Mixologic!

Mixologic’s picture

As I mentioned before, we cannot mark this as fixed. This issue was opened back in August, and is unrelated to the problem that started on september 19th, which is now fixed.

andypost’s picture

ocastle’s picture

mile23’s picture

Specifics of PHPCS failing to install is being worked on here: #3013813: Coder failing for all PHP 5 tests

I was going to be super-smug and tell people to add drupalci.yml files to their project, but you can see the PHAIL-WHALE results of that here: #3014492-4: Adopt Gitlab CI and fix CS violations detected

The tail of the build log looks like this:

18:55:14 ---------------- Finished assessment in 2.043 seconds ---------------- 
18:55:14 chown -R 1001 /var/www/html
18:55:14 chown -R 1001 /var/www/.composer/cache
18:55:15 chmod -R 777 /var/www/html
18:55:15 sudo chown -R 1001 /var/lib/mysql
18:55:16 chmod -R 777 /var/lib/mysql
18:55:23 Archiving artifacts
18:55:23 Checking console output
18:55:23 Recording test results
18:55:23 ERROR: Step ‘Publish JUnit test result report’ failed: No test report files were found. Configuration error?
18:55:23 Finished: FAILURE

This tells me that the cure should be in the JUnit publish stage, which is not a plugin but probably lives in the realm of Jenkins. So it expects JUnit but doesn't find any, which is enough to cause the build to fail. This confirms #23.

So the workaround is: Add a passing test.

zaporylie’s picture

I just noticed another one here: https://www.drupal.org/pift-ci-job/1131242

krzysztof domański’s picture

zaporylie’s picture

Re #35 - most likely because all RTBCs are tested periodically whilst Needs Review are tested only once per status change.

pancho’s picture

The remaining cases of "Build Successful" might have something to do with a failing Nightwatch test being not correctly reported as test failure, see #1149078-104: States API doesn't work with multiple select fields.

tr’s picture

@Pancho, while it's possible a Nightwatch failure, among other things, might result in a "Build successful" that's definitely NOT the cause of the problem reported in the original issue, because in the original issue there were NO tests at all.

pancho’s picture

@TR: Sure. Just saying that while introducing Nightwatch, the buggy behaviour might have been introduced as a stop gap to Nightwatch not correctly reporting its results. However I can't find any commit on:

that corresponds to the test results you gave on your initial report.
Then again, between July 18, 2018 02:16 and July 19, 2018 03:34, there's been 11 commits on DrupalCI: Environments that possibly might have caused this. I'm not sufficiently into the PIFT infrastructure to be of any help here.

tr’s picture

tr’s picture

Issue summary: View changes

Fixed issue link in the issue summary.

tr’s picture

The situation detailed in the original post is still an issue.