The rule name shows as cut off in the results.
example of cut off

CommentFileSizeAuthor
Capture.PNG10.56 KBelachlan

Comments

elachlan created an issue. See original summary.

Mixologic’s picture

Project: DrupalCI: Drupal.org Testing Infrastructure » DrupalCI: Test Runner
Assigned: Unassigned » Mixologic
jonathan1055’s picture

Yes, I have had this a few times and could not see any particular pattern. Is it worth linking the specific results here? Mine were fairly recent. I will get the links.

Mixologic’s picture

Component: User interface » Artifacts and Output
jonathan1055’s picture

I don't think I have seen this problem for a while. If I do I will link to the results.

elachlan’s picture

jonathan1055’s picture

Here is an example from today of a core patch
https://www.drupal.org/pift-ci-job/461995

Is it caused by the fact that the name should start with a backslash, but it is not properly escaped? ... that somehow it evaluates \D which does not get displayed?

mile23’s picture

Mixologic’s picture

Also, in JunitXMLFormat.php there is :

        // Cleanup the class, and the parens from the test method name
        $test_method = substr($result['function'], strpos($result['function'], '>') + 1);
        $test_method = substr($test_method, 0, strlen($test_method) - 2);

These can probably be replaced with a preg replace.
Its currently expecting "Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest->testEntityView()"
But sometimes gets just "Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest" (which the causes the first character and last 2 chars to get cut off.)
Sometimes we get only the word 'Unknown' (Unknown becomes nkno because of these substrings).

so, better logic needed there.

elachlan’s picture

  • Mixologic committed 6d863e3 on 2602248-testresult-rule-name-cutoff
    Issue #2602248 by elachlan, Mixologic, jonathan1055: Test result rule...
Mixologic’s picture

Status: Active » Needs review

We change it here. I changed it, its on a branch. When we move it into dev, then production it'll be fixed for all.

mile23’s picture

We can make a more isolated unit test of generateJunitXml() once #2823816: Always use the container-injected build, modify BuildTaskInterface::run() and ::start() to not pass $build is in and clarifies which build object is in control.

Mixologic’s picture

Status: Postponed » Fixed

Im going to mark this as fixed, and open a follow up to add a test for the generated junit xml

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.