Skip to content

testability-index DI detection fails for Lombok constructor injection #1

@vallenblake0-ray

Description

@vallenblake0-ray

Summary
Tool:​ testability-index
Problem:​ DI score shows 0% even when using Lombok's constructor injection annotations (@requiredargsconstructor, @AllArgsConstructor, @NoArgsConstructor)
Effect:​ False-negative assessment of project's testability, misleading "high-risk" AI safety rating

Current Behavior
When a Spring Boot project uses Lombok annotations for constructor-based dependency injection:

@Service
@RequiredArgsConstructor
public class UserService {
    private final UserRepository userRepository;
    private final EmailService emailService;
    
    public void processUser(User user) {
        // Business logic
    }
}

The tool reports:

{
  "dependencyInjectionScore": 0,
  "message": "Only 0% of classes use dependency injection — hard to mock for AI verification."
}

The tool should:

  1. Recognize Lombok-annotated constructors as valid dependency injection
  2. Calculate DI score based on actual constructor injection usage
  3. Provide accurate testability assessment for Spring Boot + Lombok projects

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions