UtkarshSinghChauhan opened a new pull request, #3265:
URL: https://github.com/apache/maven-surefire/pull/3265

   This pull request addresses a regression introduced in version 3.5.4 where 
the configured reportNameSuffix is no longer appended to the classname 
attribute in the generated XML report.
   In version 3.5.3, the StatelessXmlReporter used 
report.getSourceName(reportNameSuffix) when generating the <testcase> element. 
This ensured that any configured suffix (for example, (Linux)) was correctly 
included in the classname attribute of the XML output.
   However, in 3.5.4 the logic was modified to prefer report.getSourceText(). 
While this change may have been intended to improve source handling, it 
unintentionally bypasses the reportNameSuffix logic. As a result, the suffix is 
omitted from the XML report even when it is explicitly configured.
   For example:
   Expected behavior (3.5.3):
   <testcase classname="com.example.MoneyTest(Linux)" ... />
   
   Actual behavior (3.5.4):
   <testcase classname="com.example.MoneyTest" ... />
   
   
   This patch restores the previous behavior by ensuring that 
report.getSourceName(reportNameSuffix) is used so that the configured suffix is 
consistently preserved in the XML output.
   The change was verified by:
   Building the project with mvn clean install
   Running tests successfully
   Creating a sample project to confirm that the generated XML report includes 
the expected suffix
   
   This restores backward compatibility and aligns the behavior with user 
expectations when reportNameSuffix is configured.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to