BC replay is an npm command used to replay Business Central recordings.
The following things must be available to use this command:
- NodeJs minimum version 16.14.0
- PowerShell version 7+
Create a new folder and cd
to it.
npm i @microsoft/bc-replay --save
Now add a folder to store some recordings, e.g. mkdir recordings and add some recording .yml files.
Then you can run any tests added to the recordings folder against Business Central web client instance:
npx replay .\recordings\*.yml -StartAddress http://localhost:8080/
npx replay
[-Tests] <String>
-StartAddress <String>
[-Authentication Windows|AAD|UserPassword]
[-UserNameKey <String>]
[-PasswordKey <String>]
[-Headed]
[-ResultDir<String>]
File glob pattern to select the tests recordings to run
The url to the deployed web client.
The authentication to use against the web client. One of Windows, AAD, UserPassword. Windows is the default. It does not support multi-factor authentication. Use an account that requires only a username and password to sign in for your tests.
When -Authentication is set to AAD or UserPassword then a user name and password must be given. These must be transferred as environment variables and -UserNameKey and -PasswordKey are used to specify which environment variables contains these.
Will show the test running in the browsers.
The directory to write the test results.