Interface GameTestSettings


@Experimental public interface GameTestSettings
Represents the settings for game and/or client tests.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gradle.api.provider.Property<Boolean>
    Contains a boolean property indicating whether the run directories should be cleared before running the tests.
    org.gradle.api.provider.Property<Boolean>
    Contains a boolean property indicating whether a new source set should be created for the tests.
    org.gradle.api.provider.Property<Boolean>
    Contains a boolean property indicating whether a run configuration will be created for the client side game tests, using the Fabric API Client Test framework.
    org.gradle.api.provider.Property<Boolean>
    Contains a boolean property indicating whether a run configuration will be created for the server side game tests, using Vanilla Game Test framework.
    org.gradle.api.provider.Property<Boolean>
    Contains a boolean property indicating whether the eula has been accepted.
    org.gradle.api.provider.Property<String>
    Contains a string property representing the mod ID associated with the tests.
    org.gradle.api.provider.Property<String>
    Contains a string property representing the username to use for the client side game tests.
    default void
    modId(File fabricModJsonFile)
    Sets getModId() property based on the id field defined in the provided file.
  • Method Details

    • getCreateSourceSet

      org.gradle.api.provider.Property<Boolean> getCreateSourceSet()
      Contains a boolean property indicating whether a new source set should be created for the tests.

      Default: false

    • getModId

      @Optional org.gradle.api.provider.Property<String> getModId()
      Contains a string property representing the mod ID associated with the tests.

      This must be set when getCreateSourceSet() is set.

    • getEnableGameTests

      org.gradle.api.provider.Property<Boolean> getEnableGameTests()
      Contains a boolean property indicating whether a run configuration will be created for the server side game tests, using Vanilla Game Test framework.

      Default: true

    • getEnableClientGameTests

      org.gradle.api.provider.Property<Boolean> getEnableClientGameTests()
      Contains a boolean property indicating whether a run configuration will be created for the client side game tests, using the Fabric API Client Test framework.

      Default: true

    • getEula

      org.gradle.api.provider.Property<Boolean> getEula()
      Contains a boolean property indicating whether the eula has been accepted. By enabling this you agree to the Minecraft EULA located at https://aka.ms/MinecraftEULA.

      This only works when getEnableClientGameTests() is enabled.

      Default: false

    • getClearRunDirectory

      org.gradle.api.provider.Property<Boolean> getClearRunDirectory()
      Contains a boolean property indicating whether the run directories should be cleared before running the tests.

      This only works when getEnableClientGameTests() is enabled.

      Default: true

    • getUsername

      @Optional org.gradle.api.provider.Property<String> getUsername()
      Contains a string property representing the username to use for the client side game tests.

      This only works when getEnableClientGameTests() is enabled.

      Default: Player0

    • modId

      default void modId(File fabricModJsonFile)
      Sets getModId() property based on the id field defined in the provided file.