-
Notifications
You must be signed in to change notification settings - Fork 22
Testing
There are many tests in dspace. Unit tests for both backend and frontend as well as integration tests. Then there are tests that run as Github actions.
TODO
Tests are run from this docker compose.
In service dspacedb there is environment variable LOADSQL that loads SQL script which contains database dump. Tests will be run on this database.
It is possible to change it by uploading it into this release.
It was necessary to change entrypoint into service dspace, in order to create new metadata fields (added force after dspace database migrate).
Database migrations are in following folder (and subfolders) dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration. Subfolder postgres is used when dspace is installed and deployed, h2 is used for tests with in-memory database. If migration is added to postgres, it needs to be added to h2 as well.
- Drop database in pgAdmin or use command
dropdb --username=postgres dspace(with appropriate username) - In PostgreSQL\13\bin:
createdb --username=postgres --owner=dspace --encoding=UNICODE dspace - Create extension pgcrypto
psql -U postgres -d dspace -c "CREATE EXTENSION pgcrypto" - In [dspace]/bin/
dspace database migrate - Create new admin:
dspace create-administrator
Why to do that: Running test time:
- Using cmd: 90s
- InteliJ: 40s
Steps:
- Edit Configurations
- Add -> choose JUnit
- Run params:
-ea -Ddspace.dir=[dspace-source]/dspace-server-webapp/target/testing/dspace/ -Dsolr.install.dir=. - Option: Shorten command line:
JAR manifest
Screenshot:

Getting Started
Features
- All Features — full categorised list
- CLARIN Licenses
- PIDs & Handles
- Featured Services / Refbox
- Field-Level Permissions
- File Previews
- Sharing a Submission
- Personal Access Tokens
- DOI Configuration per Community
- ROR Authority
Operations
- Kubernetes Deployment
- Samples (.env, Nginx)
- Nginx + Shibboleth
- Handle Server · Setup (v7)
- Shibboleth · DiscoJuice
- Shibboleth Accounts
- S3 Storage · CESNET S3
- Google Analytics
- Matomo
- Solr
- Logging
- Custom Namespace
- Health Report
For Users
Development
Reference
- Authorizations
- Metadata Info
- Citations (proposal)
- Repository Checklist
- Search, Browse & Filters
- Localization
- Importing Items (CLI)
- NFA Import - Steps
- OpenAIRE
- DOI Registration
- Inclusion in OLAC
- Unit Testing
- Deploy Checks
- Troubleshooting
- Versioning Theory
- Dynamic Resource Versioning
- Metashare Import · Schema
- Web Server Overview
- LINDAT Common Theme
- Workshop 2016 Results
- WebLicht Integration
- Google Dataset Search
Archive (v5 / stale)
- Old Home (v5)
- Installation (v5)
- Prerequisites (v5)
- Connecting Tomcat with Apache
- Using Apache
- Building Shibboleth FastCGI
- Shibboleth Install (v5)
- EUDAT Replication
- Backup (v5)
- Spring Social / Google Drive (v5)
- Clarin (→ Repository Checklist)
- Control Panel (v5)
- Overlays (v5)
- Configuration (v5)
- Speeding Up Downloads
- Debugging (v5)
- Selenium (v5)
- Code Contributions (v5)
- Best Practices (v5)
- Testing Hudson
- Working on Windows
- Prerequisites Checklist (v5)
- Migration to DSpace 7.2.1
- Upgrade From Lindat
- Piwik (→ Matomo) · Piwik Cleaning