Skip to content

Using the plugin with Kotest 6 and selecting a package to run the tests does not work #378

@akoufa

Description

@akoufa

When selecting a package through the Intellij Context menu and trying to run the tests included in that package we are getting the following error:

Exception in thread "main" java.lang.IllegalStateException: The specs arg must be provided
	at io.kotest.engine.launcher.MainKt.main(main.kt:73)
   // The engine *must* be given the classes to execute - in Kotest 6 the engine does not perform scanning
   // It is the responsibility of the caller to pass this information.
   // In Kotest 5 a similar argument was called --spec to specify a single class but kotest 6 uses --specs
   // we need to support both so people can run kotest5 and kotest6 projects with the same plugin
   val specsArg = launcherArgs[LauncherArgs.ARG_SPECS]
      ?: launcherArgs[LauncherArgs.ARG_SPEC]
      ?: error("The ${LauncherArgs.ARG_SPECS} arg must be provided")

Checking the code above, I observed that the plugin is not setting the specs argument only the packages argument which is not used anymore by Kotest 6. Is there any adaption we need to make to be able to run all tests included in a kotlin package?

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