Skip to content

Installation Notes

Adam De Fouw edited this page Dec 13, 2023 · 1 revision

Recommended to use VS Code (free) if looking for IDE recommendation

VS Code Extensions

  • GitHub Codespaces (if using Codespaces)
  • Cucumber (Gherkin) Full Support
  • Docker
  • Dev Containers

REDCap Environment Prerequisites

(For running Cypress automated tests)

Creating a REDCap environment:

  • Option #1: Your Host Machine (requires Admin access for Docker)
  • Option #2: GitHub Codespaces (no Docker dependency for your host machine!) <= DEMO
  • Option #3: Test instance on managed server (requires IT team)

REDCap Docker <= Create a fork

https://github.com/aldefouw/redcap_docker

Codespace example:

Screen Shot 2023-12-13 at 9 44 47 AM

BRANCH: main

docker compose build
docker compose up
docker compose down

REDCap Source Code

BRANCH: varies but needs to contain the source code for the specific version of REDCap you are testing

  • Option #1: Store all REDCap versions in Git repository (preferred)
  • Option #2: Copy of source code from Vanderbilt. Copy to container for every version you test. <= DEMO

NOTE: Both docker container and source code need to be on same machine!

  • Reason: Docker container needs to be able to access the source code for the version of REDCap that you are using
  • Implication: You need to be authorized / have access to the source code (software license)
  • Recommendation: Source code in a private repository with git change management
  • Alternative: Download from Vanderbilt and make adjustments necessary for it to run in a Docker container if you wish

Running & Creating Validation Feature Tests

HOST MACHINE

Screen Shot 2023-12-13 at 9 44 00 AM

REDCap Cypress

https://github.com/aldefouw/redcap_cypress/ (this repo)

BRANCH: master


NOTE: You need to have Node and NPM installed on your host machine for this to work.

Need to create & configure:

  • cypress.env.json
  • cypress.config.js

Developing Tests:

npm install
npx cypress open

NOTE: SOURCE CODE MUST BE ACCESSIBLE TO CYPRESS THROUGH "redcap_source_path" in cypress.env.json!

"redcap_source_path": "../www"

Headless (for running on CI server):

npx cypress run

You'll want to rebase against latest version of this repository to make sure you have all latest step definitions!

REDCap RSVC <= Create a fork

https://github.com/aldefouw/redcap_rsvc

BRANCH: whatever version of source code you are testing (e.g. v13.1.37)

NOTE: Eventually branches will be replaced by tags and everything will be on master / main

Clone this wiki locally