Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Integration/E2E Acceptance #17

Open
4 tasks
PhearZero opened this issue Sep 8, 2019 · 1 comment
Open
4 tasks

Integration/E2E Acceptance #17

PhearZero opened this issue Sep 8, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@PhearZero
Copy link
Contributor

PhearZero commented Sep 8, 2019

🚀 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 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)
})

Backlog

@PhearZero PhearZero added the enhancement New feature or request label Sep 8, 2019
PhearZero added a commit that referenced this issue Sep 11, 2019
PhearZero added a commit that referenced this issue Sep 11, 2019
Need a way to smoke test the ecosystem for future work in #17 #15
@stale
Copy link

stale bot commented Nov 7, 2019

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.

@stale stale bot added the wontfix This will not be worked on label Nov 7, 2019
@matteovivona matteovivona removed the wontfix This will not be worked on label Nov 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants