Skip to content

fcrepo4-labs/fcrepo4-release-test-suite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fedora 4 Release Test Suite

A set of integration tests that runs against a given version of fcrepo-webapp, Solr, and Fuseki server. You can use this test suite to verify a fresh instance using fcrepo4-vagrant or Fedora 4 Docker.

It is a Java version of Fedora 4 Tests(shell scripts). This program will create, update and delete resources in the repository, so you may not want to use it on a production Fedora server.

Note that there is a time delay for the new Fedora object to be indexed by Solr or Fuseki. Thus you may need to customize the waiting time (Default: 1mins).

Configuration

Edit the config.properties file, example below

fedoraBaseURL=http://localhost:8080/fcrepo/rest
fusekiURL=http://127.0.0.1:8080/fuseki/test/query
solrURL=http://localhost:8080/solr/collection1
fedoraadminpassword=secret3
testpassword=password1
adminuserpassword=password2

To run with Maven:

Run all tests with default settings on a Fedora 4 vagrant

mvn clean -Dtest=VagrantAuthTestSuite test

Run all tests with FEDORA_AUTH=false setting on a Fedora 4 vagrant

mvn clean -Dtest=VagrantTestSuite test

Run tests with custom waiting time

mvn clean -Dtest=VagrantTestSuite -Dwaitingtime=3000 test

Run a single test with custom waiting time

mvn clean -Dtest=FusekiTest -Dwaitingtime=3000 test

Run tests on a Fedora 4 instance only.

mvn clean -Dtest=Fcrepo4TestSuite test

Test Cases

AuthzTest

  1. Create a container called cover
  2. Patch it to a pcdm:Object
  3. Create a container inside cover called files
  4. Create a container called my-acls
  5. Create a container called acl inside my-acls
  6. Create a container called authorization inside acl
  7. Patch authorization with a WebAC Authorization.
  8. Patch cover to add acl as an access control.
  9. Verify Anonymous can't access cover
  10. Verify fedoraAdmin can access cover
  11. Verify testadmin can access cover
  12. Verify testuser can't access cover

FixityTest

  1. Create a binary resource
  2. Get a fixity result for that resource and compare that the SHA-1 hash matches the expected value

FusekiTest

  1. Create a container
  2. Query that container in the Fuseki server

IndirectTest

  1. Create a pcdm:Object
  2. Create a pcdm:Collection
  3. Create an indirect container "members" inside the pcdm:Collection
  4. Create a proxy object for the pcdm:Object inside the members indirectContainer
  5. Verify that the pcdm:Collection has the memberRelation property added pointing to the pcdm:Object

NestedTest

  1. Create a container
  2. Create a container inside the container from step 1
  3. Create a binary inside the container from step 2
  4. Delete the binary
  5. Delete the container from step 1

SolrTest

  1. Create a container
  2. Search that container in the Solr server

SparqlTest

  1. Create a container
  2. Set the dc:title of the container with a Patch request
  3. Update the dc:title of the container with a Patch request
  4. Create a binary
  5. Set the dc:title of the binary with a Patch request
  6. Update the dc:title of the binary with a Patch request

TransactionTest

  1. Create a transaction
  2. Get the status of the transaction
  3. Create a container in the transaction
  4. Verify the container is available in the transaction
  5. Verify the container is not available outside the transaction
  6. Commit the transaction
  7. Verify the container is now available outside the transaction
  8. Create a second transaction
  9. Create a container in the transaction
  10. Verify the container is available in the transaction
  11. Verify the container is not available outside the transaction
  12. Rollback the transaction
  13. Verify the container is still not available outside the transaction

VersionTest

  1. Create a container
  2. Check for versions of the container
  3. Create a version of the container (version1)
  4. Try to create another version with the same label
  5. Update the container with a PATCH request
  6. Create another version of the container (version2)
  7. Try to delete the current version
  8. Revert to the previous version (version1)
  9. Delete the newer version (version2)

Maintainers

Current maintainers:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages