You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
Introduce End To End and Integration testing to the Mono-Repo
Motivation
Separation of concern from the Frontend and Backend developers. Core developers can create test specifications which will act as release acceptance criteria during build time. This is done via CI triggers.
Details
./test/ folder should contain compliance for HospitalRun CLI, HospitalRun Server and HospitalRun FrontEnd integrations. If Feature X is implemented in more than one module then we should have a ./test/feature_x.spec.ts or ./test/feature_x/index.spec.ts that ensures modules are working in a real world environment. All modules must pass a basic smoke test prior to E2E testing via cross-env CI=true pnpm test -r. (jsdom, cypress, unit tests, etc)
Example CI
merge feature branch into next branch === trigger monorepo build with e2e/integration tests
a. Pass === release all packages (merge next into master in each changed module)
b. Fail === Notify linked issues/pull requests
Example Spec:
import {frontend, server} from 'hospitalrun'
server.start({frontend}) // start backend with server side render
// Example SSR Feature
it('should server side render the frontend', () => {
browser.url(server.uri)
const title = browser.getTitle()
assert.equal(title, 'Some Assertion')
})
// Example Offline Feature
it('should work offline', () => {
browser.url(server.uri)
// We could simulate bad connections or limited throughput scenerios
browser.setNetworkConditions({ latency: 0, throughput: 0, offline: true })
const title = browser.getTitle()
assert.equal(title, 'Some Offline Assertion')
})
// Test all core service states e2e
it('should have X feature', () => {
browser.url(server.uri)
// Do some action that would create data in the database
// $('#button').click()
const data = server.db.get('someId')
assert.equal(data._id, 'someId)
})
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
🚀 Feature Proposal
Introduce End To End and Integration testing to the Mono-Repo
Motivation
Separation of concern from the Frontend and Backend developers. Core developers can create test specifications which will act as release acceptance criteria during build time. This is done via CI triggers.
Details
./test/
folder should contain compliance forHospitalRun CLI
,HospitalRun Server
andHospitalRun FrontEnd
integrations. IfFeature X
is implemented in more than one module then we should have a./test/feature_x.spec.ts
or./test/feature_x/index.spec.ts
that ensures modules are working in a real world environment. All modules must pass a basic smoke test prior to E2E testing viacross-env CI=true pnpm test -r
. (jsdom, cypress, unit tests, etc)Example CI
merge
feature branch
intonext
branch === triggermonorepo
build with e2e/integrationtests
a. Pass === release all packages (merge next into master in each changed module)
b. Fail === Notify linked issues/pull requests
Example Spec:
Backlog
The text was updated successfully, but these errors were encountered: