How Do We Use It?
Provides detailed steps how to start using Meissa. Find detailed explanations for all keywords, available arguments.
- Start Meissa server
To coordinate all agents and runners Meissa has its own server with its own DB.
- Start Meissa test agent
meissa.exe testAgent --testAgentTag="APIAgent" --testServerUrl="http://IPServerMachine:5000"
Start Meissa in test agent mode on all machines that you want to be agents. Depending on their resources and what will be executed, prefer scenarios where the test agent runs there in isolation.
Make sure to set the correct test server URL. It is formed by the IP of the machine where you have started Meissa in server mode.
You mark all of your test agents with specific tags. It is so because you can have multiple test agents connected to a single test server. However, you can run tests only on test agents with a specific tag (a machine that has a particular program installed, etc.). The computers where you execute your UI tests will be most probably stronger than the one that you run your API tests and has additional software installed.
Usually, you have one test agent per machine. So, the more machines you have, the faster your tests will be executed.
meissa.exe testAgent --testAgentTag="API" --testServerUrl="http://00.220.159.255:5000"
- Start Meissa tests runner
meissa.exe runner --resultsFilePath="pathToResults\result.trx" --outputFilesLocation="pathToBuildedFiles" --agentTag="API" --testTechnology="MSTest" --testLibraryPath="pathToBuildedFiles\SampleTestProj.dll"
Usually, you start the runner from CI job. The typical workflow will be:
- Download the tests source code
- Build it
- Execute tests with Meissa
- Publish the results produced by Meissa
The path where the results produced by the runner will be saved. The file should be in the expected file format. TRX is the file format for .NET tests. In Java, the extension will be different.
Output files location is the place where the files of your built libraries are placed. They should be moved there after you build your project.
The testTechnology argument is used to point which native runner should Meissa use. Right now you can choose between MSTest and NUnit (NodeJs Jasmine runner comming soon). Later, more options will be added. The parameter is required since depending on the technology used the localization of tests, merge of tests results, test executions are different. With the MSTest switch you can test .NET framework and .NET Core projects.
The path to the file where your tests are located, it is located in the same folder pointed with the outputFilesLocation argument.
meissa.exe runner --resultsFilePath="D:\MyRuns\result.trx" --outputFilesLocation="D:\MyRuns\BuildFiles\" --agentTag="API" --testTechnology="MSTest" --testLibraryPath="D:\MyRuns\BuildFiles\BellatrixTests.dll"
This argument will pass the value to the native tests runner. Here, we tell the .NET Core tests runner to produce a detailed log.
--retriedResultsFilePath="pathToResults\retriedResult.trx" --retriesCount=3 --threshold=90
With this one, we tell Meissa to retry the failed tests three times if less than 5% of all tests have failed.
--testsFilter="test.FullName != \"TestName\" AND !test.Categories.Contains(\"CI\")"
Meissa has a built-in complex test filter parser, and we can write complex queries to filter the tests.
Sometimes, it is useful to pass data to tests from the runner. For example, you may need to pass the current build number, so you can create a folder in your tests. If you use this argument, each agent will create an environmental variable with the name BuildNumber, and it will assign the value 42. After that, it is easy to get the value from your tests.
Instructs Meissa to balance the tests, not based on the count, but on the previous execution times of the tests. To use it, you need to execute all your tests at least one time. This is quite useful because some of your UI tests may execute for 1 minute or more but most of them for 30 seconds or less. As I mentioned, the whole tests execution time is equal to the slowest sub-run. This feature can sometimes drastically decrease the execution time.
Tells Meissa to execute the tests on each agent in parallel. You can even specify how many processes to spawn. This is most useful for unit, API, or headless UI tests.