0.0.8 • Published 3 years ago

testcafe-reporter-db v0.0.8

Weekly downloads
947
License
MIT
Repository
github
Last release
3 years ago

testcafe-reporter-db

Build Status npm version

This is the db reporter plugin for TestCafe.

Table of Contents

DB Engines supported

  • MySQL

Getting Started

Installation

npm install testcafe-reporter-db

Initial Configuration

In order to use the reporter correctly, you have to edit or create the .env file, by adding the following required environment variables:

Database connection details /play 56k

TESTCAFEREPORTER_DB_USERNAME=
TESTCAFEREPORTER_DB_PASS=
TESTCAFEREPORTER_DB_HOST=

Database and table details

TESTCAFEREPORTER_DB_DB=
TESTCAFEREPORTER_DB_RUN_RESULTS_TABLE=
TESTCAFEREPORTER_DB_TEST_TABLE=

Tescafe Reporter configuracion. If you are interested in store each test result, you should use 1. If you are interested in store only failed results, the value should be 0.

TESTCAFEREPORTER_DB_TESTSTORED=
TESTCAFEREPORTER_DB_DEVICE=
TESTCAFEREPORTER_DB_BROWSER=
TESTCAFEREPORTER_DB_ENV=
TESTCAFEREPORTER_DB_OTHER_RUN=
TESTCAFEREPORTER_DB_OTHER_TEST=

Database Configuration

  • Run_results_table

Fields:

FieldTypeLenghtAllow NullExtra
idInt11Noauto_increment
dateDatetimeNoauto_increment
run_numberInt11NoNone
run_resultVarchar1NoNone
test_totalInt4NoNone
test_passedInt4NoNone
test_failedInt4NoNone
test_skippedInt4NoNone
test_durationVarchar10NoNone
test_deviceVarchar50YesNone
test_browserVarchar150YesNone
test_environmentVarchar50YesNone
test_other_1Varchar50YesNone
  • run_result : 0 if the run passed. 1 if the run failed.
  • Test_results_table
FieldTypeLenghtAllow NullExtra
idInt11Noauto_increment
run_numberInt11NoNone
fixture_nameVarchar1000NoNone
test_nameVarchar1000NoNone
test_resultInt1NoNone
test_otherVarchar100NoNone
  • test_result : 0 if the test passed. 1 if the test failed. 2 if the test was skipped

Usage

When you run tests from the command line, specify the reporter name by using the --reporter option:

testcafe chrome 'path/to/test/file.js' --reporter db

When you use API, pass the reporter name to the reporter() method:

testCafe
    .createRunner()
    .src('path/to/test/file.js')
    .browsers('chrome')
    .reporter('db') // <-
    .run();

Roadmap

Contributing

  • If you want to suggest a change, feature or any question, feel free to open an issue or a pull request.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Author

+Based on testcafe-reporter-list+

Acknowledgments

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

4 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago