Pharo test defects

Package: pharo-test-analysis (JavierLarre/pharo-test-analysis, row 90)

State
Fixed (package repair)
Defect in
see the record
Tests
0
Fix
javierlarre-pharo-test-analysis.st, javierlarre-pharo-test-analysis.patch
Upstream repository
JavierLarre/pharo-test-analysis

The record is the text of the repair. The Results table is the last run of the row.

Record

Test

Load the package into a Pharo 14 image (build 791) with the load expression of the test run, file in the fixes file of the row if there is one, and run the test classes of the package.

"row 90"
Metacello new baseline: 'FirstToFix'; repository: 'github://JavierLarre/pharo-test-analysis:master/src'; onConflict: [:e | e useIncoming]; load: #('Core' 'Tests').

Results

Last result of the package run (stock Cog and iospharo on the same image).

RowLabelLoadStock Cogiospharo VM
90javierlarre-pharo-test-analysisoktests=71 P=71 F=0 E=0 S=0 T=0 X=0tests=71 P=71 F=0 E=0 S=0 T=0 X=0

Fix

Fixes file (filed in after the load): javierlarre-pharo-test-analysis.st (download)
"JavierLarre/pharo-test-analysis: 4 tests of TSDAssertionLessDetectorTest
(testHasAssertion, testHasConnectedAssertion, testHasConnectedAssertionTwice,
testIsAssertionLess) fail the same way on stock Cog and on our VM, with
'MessageNotUnderstood: RTDHelperVisitor >> #messages'.  No VM defect.

Cause: commit cbc92d1 of the package (removed unnecessary hierarchy) made
RTDHelperVisitor a subclass of Object.  Before, it was a subclass of
RTDMessageVisitor and inherited #messages.  Now it keeps its own
RTDMessageVisitor in the instance variable messageVisitor and forwards
#analyzeMethod:, #helpers and #helperSelectors, but not #messages.
TSDAssertionLessDetector>>hasNoAssertionSelectors still sends
'self methodVisitor messages does: ... includesMessage: ...' to the
RTDHelperVisitor, so each detection of an assertion-less test raises the
error.  The package code is wrong (an unfinished refactoring); the tests are
right.  The repair adds RTDHelperVisitor>>messages, which answers the messages
that the inner message visitor collected, the same object that the old
inherited accessor answered."

add value: #RTDHelperVisitor value: #messages value: 'accessing'
	value:
'messages

	^ messageVisitor messages'.
Patch of the package source: javierlarre-pharo-test-analysis.patch (download)
diff --git a/src/BaselineOfFirstToFix/BaselineOfFirstToFix.class.st b/src/BaselineOfFirstToFix/BaselineOfFirstToFix.class.st
index e47f9d4..307902a 100644
--- a/src/BaselineOfFirstToFix/BaselineOfFirstToFix.class.st
+++ b/src/BaselineOfFirstToFix/BaselineOfFirstToFix.class.st
@@ -19,17 +19,17 @@ BaselineOfFirstToFix >> baseline: spec [
 				package: 'DrTests-FirstToFix' with: [ spec requires: #('RottenTestsDebugger') ];
 				package: 'DrTests-FirstToFix-Tests' with: [ spec requires: #('DrTests-FirstToFix') ];
 				
-				package: 'TestSmellsDetector';
+				package: 'TestSmellsDetector' with: [ spec requires: #('RottenTestsDebugger') ];
 				package: 'TestSmellsDetector-FakeTests';
 				package: 'TestSmellsDetector-Tests' with: [ spec requires: #('TestSmellsDetector' 'TestSmellsDetector-FakeTests') ];
 				package: 'DrTests-TestSmellsDetector' with: [ spec requires: #('TestSmellsDetector') ];
-				package: 'DrTests-TestSmellsDetector-Tests' with: [ spec requires: #('DrTests-TestSmellsDetector' 'TestSmellsDetector-FakeTests') ] ].
+				package: 'DrTests-TestSmellsDetector-Tests' with: [ spec requires: #('DrTests-TestSmellsDetector' 'TestSmellsDetector-FakeTests') ].
 
 			"Groups"
 			spec
 				group: 'Core' with: #('RottenTestsDebugger' 'TestSmellsDetector');
-				group: 'Tests' with: #('FirstToFix-Tests' 'TestSmellsDetector-Tests');
+				group: 'Tests' with: #('RottenTestsDebugger-Tests' 'TestSmellsDetector-Tests');
 				group: 'Plugins' with: #('DrTests-FirstToFix' 'DrTests-TestSmellsDetector' 'DrTests-FirstToFix-Tests' 'TestSmellsDetector-Tests');
 				group: 'default' with: #('Core' 'Plugins' 'Tests');
-				group: 'All' with: #('Core' 'Tests' 'Plugins')
+				group: 'All' with: #('Core' 'Tests' 'Plugins') ]
 ]
Fixtures: javierlarre-pharo-test-analysis.txt (download)
# TSDFakeTests: data for the TSD*Test classes (TSDDetectorTest>>fixtureClass, TSDInstanceVariablesFinderTest>>fixtureClass, TSDClassReferencesVisitorTest>>fixtureClass). setUp calls "self skip" on purpose; the real tests read its methods and never run them.
TSDFakeTests
# TSDSubFakeTests: subclass of TSDFakeTests, same use (TSDSubclassUselessTest>>fixtureClass, TSDAssignmentsFinderTest>>fixtureClass). Its setUp calls super setUp, so it skips too.
TSDSubFakeTests

State of 2026-11-20. Made from the test records of the iospharo project (a second Pharo VM). The fixes are proposals for review.