Skip to content

Dependency injection problem in tests for Spring application #475

Description

@Gabriel-Darbord

Context

Generating tests for a Spring application that uses @Autowired beans.

Current Result

Tests were generated successfully, but dependencies were not injected, resulting in useless tests (always expecting a NullPointerException).

Expected result

EvoSuite should be able to handle dependency injection as explained in this paper.

Additional info

I've read from the v1.1.0 release that JEE support has been removed. It is unclear to me if this is still the case since v1.2.0.
I tried using v1.0.6 without success, but that is a different issue.

Can the latest release of EvoSuite generate tests handling dependency injection?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions