Skip to content

Commit

Permalink
Merge pull request #680 from EBISPOT/testcases_expected_output
Browse files Browse the repository at this point in the history
Testcases expected output
  • Loading branch information
henrietteharmse authored Jun 17, 2024
2 parents 3e5dfc0 + b448dc1 commit bc9f673
Show file tree
Hide file tree
Showing 1,128 changed files with 718,531 additions and 22,224 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ This repository contains three projects:

# Deploying OLS4

Deployment instructions will go here. OLS4 is still under heavy development, so currently we only have detailed
instructions for developers below.

However, if you just want to try it out, this should get you going:
If you want to try OLS4 out, this should get you going:

export OLS4_CONFIG=./dataload/configs/efo.json
docker compose up
Expand Down Expand Up @@ -367,10 +364,20 @@ local (Dockerized) Solr and Neo4j servers:
The frontend is a React application in `frontend`. See [frontend docs](frontend/README.md)
for details on how to run the frontend.

## Development: Updating `testcases_expected_output`
## Development: Updating `testcases_expected_output` and `testcases_expected_output_api`
If you make changes to the data load or API of OLS, you need to run testcases and compare it against the expected outputs
to ensure backward compatibility. This testing consists of

1. testing the dataload outputs by comparing test outputs to expected outputs, and
2. API testing which compares API responses to expected responses.

### Testing dataload
These tests are run locally as described in [Test testcases from dataload to UI](#test-testcases-from-dataload-to-ui)

First make sure all the JARs are up to date:

mvn clean package

If you change something that results in the test output changing (e.g. adding new tests, changing what the output looks
like), the CI on this repo will fail.

To fix this, you need to replace the `testcases_expected_output` and `testcases_expected_output_api` folders with the
new expected output. **You should do this in the same commit as your code/test changes because then we can track exactly
Expand Down
2 changes: 2 additions & 0 deletions compare_testcase_output.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
diff --recursive --exclude=.gitkeep testcases_output/testcases testcases_expected_output/
2 changes: 1 addition & 1 deletion dev-testing/teststack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function process_config {
local absolute_out_dir=$(realpath -s $relative_out_dir)
echo "absolute_out_dir="$absolute_out_dir

$OLS4_HOME/dataload/create_datafiles.sh $config_url $absolute_out_dir
$OLS4_HOME/dataload/create_datafiles.sh $config_url $absolute_out_dir --noDates

$OLS4_HOME/dev-testing/load_test_into_solr.sh $absolute_out_dir
else
Expand Down
Loading

0 comments on commit bc9f673

Please sign in to comment.