* initial work on rewriting test cases using the raw literal format * split out the embedded tests into separate file and implement the test using a generic tester function * initial work on rewriting test cases using the raw literal format * split out the embedded tests into separate file and implement the test using a generic tester function * moved tests to separate dir to avoid conflicts * removed duplicate files * added license header * fixed plugin paths * moved all trivial tests to separate files created "meta-test" that scans a folder of api tests and runs them * remove rpc tests from make * use fileutil.FindDir instead of pwd clean up the test files
Testing Text Processing
The text processing tests located in the doc/developer/tests folder are designed for use with the /test url command. This command posts the raw contents of a specified .md file in the doc/developer/test folder into Mattermost.
Turning on /test
Access the System Console from the Main Menu. Under Service Settings make sure that Enable Testing is set to true, then click Save. You may also change this setting from config.json by setting ”EnableTesting”: true. Changing this setting requires a server restart to take effect.
Running the Tests
In the text input box in Mattermost, type: /test url [file-name-in-testing-folder].md. Some examples:
/test url test-emoticons.md
/test url test-links.md
Notes:
- If a test has prerequisites, make sure your Mattermost setup meets the requirements described at the top of the test file.
- Some tests are over 4000 characters in length and will render across multiple posts.
Manual Testing
It is possible to manually test specific sections of any test, instead of using the /test command. Do this by clicking Raw in the header for the file when it’s open in GitHub, then copy and paste any section into Mattermost to post it. Manual testing only supports sections of 4000 characters or less per post.