This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { runMochaTests } = require('./lib/mocha-setup'); | |
| const { defineTestSuiteAndAddTests } = require('./programmatic/sample-tests'); | |
| const { defineDBTestSuiteAndAddTests } = require('./programmatic/db-test'); | |
| (async () => { | |
| defineTestSuiteAndAddTests(); | |
| await defineDBTestSuiteAndAddTests(); | |
| try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { suite, Test } = require('../lib/mocha-setup') | |
| const { sendSQLServerQuery } = require('../lib/db-connect') | |
| const expect = require('chai').expect; | |
| const reportValue = require('mochawesome/addContext'); | |
| const defineDBTestSuiteAndAddTests = async () => { | |
| const parentSuiteName = suite('sql server database test') | |
| await validatedbData(parentSuiteName); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const sql = require("mssql"); | |
| const sendSQLServerQuery = async (query) => { | |
| const config = { | |
| user: 'sa', | |
| password: 'Stupipassword123!', | |
| server: 'localhost', | |
| port: 60666, | |
| database: 'TutorialDB', | |
| options: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM microsoft/mssql-server-linux:latest | |
| ENV ACCEPT_EULA=Y | |
| # update password | |
| ENV SA_PASSWORD=Strongpassword123! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { runMochaTests } = require('./lib/mocha-setup'); | |
| const { defineTestSuiteAndAddTests } = require('./programmatic/sample-tests'); | |
| (async () => { | |
| defineTestSuiteAndAddTests(); | |
| try { | |
| const result = await runMochaTests() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { suite, Test, suiteInstance } = require('../lib/mocha-setup') | |
| const expect = require('chai').expect; | |
| const reportValue = require('mochawesome/addContext') | |
| const defineTestSuiteAndAddTests = () => { | |
| const parentSuiteName = suite('sample test suite') | |
| comparisonWithNumber10Tests(parentSuiteName); | |
| stringValidationTests(parentSuiteName); | |
| testUnderParentSuite(parentSuiteName) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Mocha = require('mocha'); | |
| const moment = require('moment-timezone'); | |
| const path = require('path') | |
| // for reporting | |
| const currentDateTime = moment().tz('Australia/Sydney').format('YYYY/MM/DD/HH:mm:ss'); | |
| const reportDirectory = path.resolve(__dirname, `../execution-report/${currentDateTime}`) | |
| // mocha setup | |
| const Test = Mocha.Test; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM cypress/browsers:chrome67 | |
| # COPY package.json . | |
| RUN mkdir -p mnt | |
| COPY . mnt/ | |
| RUN cd mnt && npm i cypress | |
| RUN cd mnt && npm i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # remove --spec all tests need to be executed | |
| npx cypress run --record --key 628bbf4f-987a-44a2-83dc-a5f690b1bf60 --spec "cypress/integration/examples/location.spec.js,cypress/integration/examples/aliasing.spec.js" | |
| #create new folder to store final report | |
| mkdir -p execution-report | |
| # merge all reports from repport folder and generate one json file | |
| npx mochawesome-merge --reportDir reports/mochawesome-report > execution-report/report.json | |
| # generate .html file from it and save it as detailed-report-<current timestamp> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # remove --spec all tests need to be executed | |
| npx cypress run --spec "cypress/integration/examples/location.spec.js,cypress/integration/examples/aliasing.spec.js" | |
| #create new folder to store final report | |
| mkdir -p execution-report | |
| # merge all reports from repport folder and generate one json file | |
| npx mochawesome-merge --reportDir reports/mochawesome-report > execution-report/report.json | |
| # generate .html file from it and save it as detailed-report-<current timestamp> |
NewerOlder