Helper meant for executing Mill integration tests, which runs Mill in a subprocess against a folder with a build.mill
and project files. Provides APIs such as eval to run Mill commands and out to inspect the results on disk. You can use modifyFile or any of the OS-Lib os.*
APIs on the workspacePath to modify project files in the course of the test.
Value parameters
- daemonMode
-
Whether to run Mill in client-server mode. If
false
, Mill is run with--no-server
- millExecutable
-
What Mill executable to use.
- workspaceSourcePath
-
The folder in which the
build.mill
and project files being tested comes from. These are copied into a temporary folder and are not modified during tests
Attributes
- Companion
- object
- Source
- IntegrationTester.scala
- Graph
-
- Supertypes
-
trait Impltrait IntegrationTesterBasetrait AutoCloseableclass Objecttrait Matchableclass AnyShow all
Members list
Type members
Inherited classlikes
Attributes
- Inherited from:
- Impl
- Source
- IntegrationTester.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Inherited methods
Tears down the workspace at the end of a test run, shutting down any in-process Mill background servers
Tears down the workspace at the end of a test run, shutting down any in-process Mill background servers
Attributes
- Definition Classes
-
Impl -> AutoCloseable
- Inherited from:
- Impl
- Source
- IntegrationTester.scala
Evaluates a Mill command. Essentially the same as os.call
, except it provides the Mill executable and some test flags and environment variables for you, and wraps the output in a IntegrationTester.EvalResult for convenience.
Evaluates a Mill command. Essentially the same as os.call
, except it provides the Mill executable and some test flags and environment variables for you, and wraps the output in a IntegrationTester.EvalResult for convenience.
Attributes
- Inherited from:
- Impl
- Source
- IntegrationTester.scala
Initializes the workspace in preparation for integration testing
Initializes the workspace in preparation for integration testing
Attributes
- Inherited from:
- IntegrationTesterBase
- Source
- IntegrationTesterBase.scala
Attributes
- Inherited from:
- IntegrationTesterBase
- Source
- IntegrationTesterBase.scala
Helper method to modify a file containing text during your test suite.
Helper method to modify a file containing text during your test suite.
Attributes
- Inherited from:
- Impl
- Source
- IntegrationTester.scala
Helpers to read the .json
metadata files belonging to a particular task (specified by selector0) from the out/
folder.
Helpers to read the .json
metadata files belonging to a particular task (specified by selector0) from the out/
folder.
Attributes
- Inherited from:
- Impl
- Source
- IntegrationTester.scala
Prepares to evaluate a Mill command. Run it with IntegrationTester.PreparedEval.run.
Prepares to evaluate a Mill command. Run it with IntegrationTester.PreparedEval.run.
Useful when you need the IntegrationTester.PreparedEval.clues.
Attributes
- Inherited from:
- Impl
- Source
- IntegrationTester.scala
Remove any ID files to try and force them to exit
Remove any ID files to try and force them to exit
Attributes
- Inherited from:
- IntegrationTesterBase
- Source
- IntegrationTesterBase.scala
Concrete fields
Attributes
- Source
- IntegrationTester.scala
Attributes
- Source
- IntegrationTester.scala
Attributes
- Source
- IntegrationTester.scala
Attributes
- Source
- IntegrationTester.scala
Attributes
- Source
- IntegrationTester.scala
Attributes
- Source
- IntegrationTester.scala
Attributes
- Source
- IntegrationTester.scala
Inherited fields
The working directory of the integration test suite, which is the root of the Mill build being tested. Contains the build.mill
file, any application code, and the out/
folder containing the build output
The working directory of the integration test suite, which is the root of the Mill build being tested. Contains the build.mill
file, any application code, and the out/
folder containing the build output
Each integration test that runs in the same baseWorkspacePath is given a new folder for isolation purposes; even though we try our best to clean up the processes and files from each Mill run, it still doesn't work 100%, and re-using the same folder can cause non-deterministic interference and flakiness
Attributes
- Inherited from:
- IntegrationTesterBase
- Source
- IntegrationTesterBase.scala