Page tree
Skip to end of metadata
Go to start of metadata

Overview

OpenCGA uses FitNesse along with RestFixture to write and execute Acceptance Tests. Each Test page is an independent collection of tests and can be either executed independently or as a part of Suite run.

Start Fitnesse Server

User can run OpenCGA Fitnesse tests in two different ways, in both cases user must use shell script that we developed to easily execute Fitnesse Java application server, by default port 7070 is used. First mechanism is from OpenCGA source code, this allows developers to easily develop and run tests. To execute tests user must clone and install application with Maven ( more detailed information at Building from Source Code):

Clone
## Clone from Git and build with Maven
$ git clone https://github.com/opencb/opencga.git
$ mvn clean install

## Move to test folder and run shell script
$ cd opencga-tests
$ ./target/appassembler/bin/opencga-fitnesse.sh

The second mechanism of running the tests is from the installation folder – during the installation process tests are copied – , this allows any user to run the tests without the need of getting the source code and build the application. You must move to the installation folder and execute the following commands:

Start FitNesse Server
$ cd test
$ ./bin/opencga-fitnesse.sh		## you must run this command from 'test' folder

In both cases, after successful start of server, Fitnesse is launched at port 7070, you can open in a web browser http://localhost:7070/ and click in OpenCga link, you should see see something like the following webpage:


How To Run Acceptance Tests

As a first step, change the "OPENCGA_VERSION" and "TEST_HOST" variable from SuiteSetUp page and point it to the desired OpenCGA installation. 

FitNesse tests can either be executed whole as a Suite by pressing "Suite" button on top of page or individual test pages can be independently executed by pressing "Test" button on top of that page. 

             

After successful execution of tests, A summary of results displayed, one like below :

Coverage

In this section you can find information about which is the current status of acceptance test coverage. The Following are the general guidelines which apply to each of the test scenarios described below in tables

  • JSON is the expected response for each of tests with either some information or proper error message
    1. No JSON response is blocker 
    2. No error message in case of failure is major error
    3. Incorrect error message in case of failure is major error
    4. Insufficient error message will be minor error
    5. Incomplete response message will be a major error
    6. Incorrect data response will be a blocker
  • Parameters in bold are mandatory fields
  • Italic names inside the {...} are variables in WS URL and must be replaced with value
  • In most use cases id/alias can be used interchangeably 
  • id, name and alias are unique items EXCEPT for files and jobs
  • limitskip should be tested for each web services where applicable
  • includeexclude are exclusive in usage and should be tested where applicable
  • contents inside { } are Post Body data
  • Each of the test cases should cover Positive as well as Negative scenarios 
  • OpenCGA Version Column
    • (tick) Test has successfully passed
    • (error) Test has been failed
    • No Entry: Functionality not yet implemented / Test case has not yet been developed.

Users


Path (/users)


HTTP Method


Parameters


Description

OpenCGA Version
1.0 (Feb 2017)1.1 (May 2017)

1.2 (Jul 2017)

/createPOST

{ userId, name, email, password, organization}

Creates a new user
(tick)(tick)
/{user}/loginPOST
user, password

login user and return a JWT token



(tick)
/{user}/updatePOST
user, name, email...

Updates user data



(tick)
/{user}/infoGETuserReturns all information related to the specific user
(tick)(tick)
/{user}/projectsGETuser, shared

Retrieves the list of projects and studies belonging or shared with the user


(tick)(tick)
/{user}/change-passwordPOSTuser, { password, npassword}Changes the password of a user
(tick)(tick)
/{user}/configs/createPOST
user, name { }This should store the preferences of user in catalog


/{user}/configs/{name}/infoGETuser, nameFetch a user information


/{user}/configs/{name}/deleteGETuser, nameDeletes a user configuration


/{user}/configs/filters/createPOSTuser, { name, description, bioformat,query, options }Stores a predefined, frequent used set of filters


/{user}/configs/filters/{name}/infoGETuser, nameFetch a filter of given name


/{user}/configs/filters/listGETuserFetch all the filters for a user


/{user}/configs/filters/{name}/updatePOSTuser, name {...}Update fields provided in body of a specific filter


/{user}/configs/filters/{name}/deleteGETuser, nameDeletes a custom filter provided as name


/deleteGET {PENDING}userDeletes a given user


Projects


Path (/projects)


HTTP Method


Parameters


Description

OpenCGA Version
1.0 (Feb 2017)1.1 (May 2017)1.2 (Jul 2017)
/createPOST

name, alias, organism.scientificName,

organism.assembly, organization

Creates new project
(tick)(tick)
/{project}/infoGET

projects

Fetches project information
(tick)(tick)
/{project}/studiesGET
projectsFetch all the studies inside a project
(tick)(tick)
/{project}/updatePOSTproject Update project, mandatory fields must not be allowed to update
(tick)(tick)
/{project}/increleasePOSTproject Increment the current release number If new data is created

(tick)

Studies


Path (/studies)


HTTP Method


Parameters


Description

OpenCGA Version
1.0 (Feb 2017)1.1 (May 2017)1.2 (Jul 2017)
/createPOST
projectId, name, aliasCreates new study attached with a project. Test all mandatory fields and uniqueness
(tick)(tick)
/{study}/groups/createPOSTstudy, {groupId, list of users}Creates a group with optional user list
(tick)(tick)
/{study}/updatePOSTstudyUpdates some of the data inside study and verify

(tick)
/{study}/groups/{group}/updatePOSTstudy, groupId, {addUsers, setUsers, removeUsers}

Updates the members of the group

addUsers – add new member

removeUsers – remove existing member

setUsers – delete existing members list and update with new one


(tick)(tick)
/{study}/groups/{members}/updatePOSTstudy, memberIds,

{ "permissions": "",
"action": "",
"study": "",
"template": ""}

Updates the members of the group




(tick)
/searchGETprojectId, name, alias, typeSearch studies based on different parameter combinations

(tick)

(tick)
/{study}/infoGETstudyFinds info for existing and non existing study using id and alias
(tick)(tick)
/{study}/summaryGETstudyFetch study information plus some basic stats
(tick)(tick)
/{study}/scanFilesGETstudyScans the study folder to find untracked or missing files


/{study}/filesGETstudy, id, name , path, type, bioformatFetch flies in study, using different combinations of parameters and verify


/{study}/groupsGETstudyReturns the groups present in the studies
(tick)(tick)
/{study}/samplesGETstudy, name, individualId, annotationSetName, variableSetId, annotationFetch samples in the study, use different combination of the available parameters


/{study}/groups/{groupId}/infoGETstudy, groupIdReturns the group
(tick)(tick)
/{study}/groups/{groupId}/deleteGETstudy, groupIdDeletes the group


/{study}/resyncFilesGETstudyThis method is intended to keep the consistency between the database and the file system. It will check all the files and folders belonging to the study and will keep track of those new files and/or folders found in the file system as well as update the status of those files/folders that are no longer available in the file system setting their status to MISSING. (Tester have to create those files using file create or manually to test this service)


/{study}/acl/createPOST

study, permissions, members, templateId

Defines a set of permissions for a list of users or groups
(tick)
/{study}/aclGETstudyReturns the ACL of the study
(tick)(tick)
/{study}/acl/{memberId}/infoGETstudy, memberIdReturns the set of permissions granted for the user or group
(tick)(tick)
/{study}/acl/{memberId}/updatePOSTstudy, memberId, {JSON containing one of the keys 'add', 'set' or 'remove'}Updates the set of permissions granted for the user or group
(tick)(tick)
/{study}/acl/{memberId}/deleteGETstudy, memberIdDeletes all the permissions granted for the user or group
(tick)(tick)

Files


Path (/files)


HTTP Method


Parameters


Description

OpenCGA Version
1.0 (Feb 2017)1.1 (May 2017)1.2 (Jul 2017)
/createPOST
path, content, description, directoryCreates a file
(tick)(tick)
/uploadPOSTfile, fileformat, bioformat, relativeFilePathUploads a file to OpenCGA server


/updatePOSTfile, ...Modify file


/infoGETfiles, studyGet the File info
(tick)(tick)
/searchGETid, study, name, type, bioformatMulti-study search that allows the user to look for files from from different studies of the same project applying filters.


/bioformatsGET
Return the list of accepted file bioformats


/formatsGET
Returns the list of accepted formats


/groupByGETfields, study, id, name, path , type, buoformat, format, smapleIdsGroup files based on different combinations of filters


/{folder}/scanGETfolder, studyScans a folder


/{folder}/listGETfolder, studyList all the files inside a folder


/{file}/contentGETfile, studyShow contents of a file ( limited )


/{folder}/treeGETfolder, studyTree view of the files and folders inside
(tick)(tick)
/{file}/downloadGETfile, studyDownload a file


/{file}/updatePOSTfile, study {Parameters to modify}Modify the file attributes


/{file}/refreshGETfile, studyRefresh meta data related to a file/folder and returns updated files


/{file}/deleteGETfile, studyDeletes a file


/{files}/acl/createPOSTfiles, study {members}Defines a set of permissions for a list of users or groups


/files/{files}/aclGETfilesReturns the ACL defined for file / folder
(tick)(tick)
/files/{file}/grepGETfileFilter lines of the file containing a match of the pattern


/{file}/acl/{memberId}/infoGETfile, memberIdReturns the permissions granted for the user or group


/{file}/acl/{memberId}/updatePOST

file, memberId {add, set, remove}

Updates the permission granted for the user or group


/{files}/acl/{memberId}/deleteGETfiles, memberIdRemoves all the permissions granted for the user or group


Jobs


Path (/jobs)


HTTP Method


Parameters


Description

OpenCGA Version
1.0 (Feb 2017)1.1 (May 2017) 1.2 (Jul 2017)
/createPOST
{ name...}
Registers a job that has been previously run outside catalog into catalog. 
(tick)(tick)
/{jobId}/infoGET
JobIdGet the job information
(tick)(tick)
/searchGETstudy, name [Pending]

(tick)(tick)
/groupByGETfieldsGroup jobs by several fields
(tick)(tick)
/{jobId}/visitGETjobIdIncrement job visits
(tick)(tick)
/{jobIds}/deleteGETjobIdsDeletes job(s)
(tick)(tick)
/{jobIds}/acl/updatePOSTjobIds, {members}Defines a set of permissions for a list of members

(tick)
/{jobIds}/aclGETjobIdsReturns the ACL of the job
(tick)(tick)
/{jobId}/acl/{memberId}/infoGETjobId, memberIdReturns the set of permissions granted for the member
(tick)(tick)
/{jobId}/acl/{memberId}/updatePOSTjobId, memberId, {add, set, remove}Updates the set permissions granted for the member
(tick)(tick)
/{jobId}/acl/{memberId}/deleteGETjobId, memberIdRemoves all the permissions granted for the member
(tick)(tick)

Individuals


Path (/individuals)


HTTP Method


Parameters


Description

OpenCGA Version
1.0 (Feb. 2017)1.1 (May 2017)1.2 (Jul 2017)
/createPOST
study, { name...}
Creates a new Individual with data provided in body
(tick)(tick)
/{individuals}/infoGETindividualsGets individual information
(tick)(tick)
/{individuals}/searchGETname, fatherId, motherId, species.scientificName, population.nameSearch the individual using different combination of available fields
(tick)(tick)
/{individuals}/groupByGETfields, name, fatherId, motherId, species.scientificName,population.nameReturns data into group based on fields provided


/{individual}/updatePOSTindividual, {..}Updates the given param inside body for a particular individual
(tick)(tick)
/{individuals}/deleteGETindividualsDeletes individuals information


/{individual}/annotationsets/createPOSTindividual, variableSetId, {JSON containing the annotation set name and the array of annotations. The name should be unique for the individual
}
Creates an annotation set for a particular user
(tick)(tick)
/{individual}/annotationsets/annotationsetName/infoGETindividual, individualSetNameFetches info related to Annotation Set


/{individual}/annotationsets/annotationsetName/searchGETindividual



/{individual}/annotationsets/annotationsetName/updatePOSTindividual, memberId, {add,set, remove}Updates the set of permissions granted for the member


/{individual}/annotationsets/annotationsetName/deleteGETindividual, individualSetNameDeletes an Annotation Set


/{individuals}/acl/createPOSTindividuals, {members}Creates ACL for a list of individuals
(tick)(tick)
/{individuals}/aclGETindividualsReturns ACL related to individuals
(tick)(tick)
/{individuals}/acl/{memberId}/infoGETindividualId,memberIdGet the ACL info related to the specified member
(tick)(tick)
/{individual}/acl/{memberId}/updatePOSTindividual, memberId, {add,set, remove}Updates the ACL info related to a specified member
(tick)(tick)
/{individuals}/acl/{memberId}/deleteGETindividuals, memberIdRemoves the ACL related to aindividual(s) of a specified member



Cohorts


Path (/cohorts)


HTTP Method


Parameters


Description

OpenCGA Version

1.0 (Feb. 2017)

1.1 (May 2017)

1.2(Jul 2017)

/create

POST

study, { name...}

Creates a new Cohort with data provided in body


(tick)

(tick)

/{cohortId}/info

GET

cohortId

Gets Cohort information


(tick)

(tick)

/search

GET

study, name, source, sample, status, type

Search for the cohorts using different combination of available fields


(tick)

(tick)

/groupBy

GET

fields, name, id, type, status....

Returns data into group based on fields provided




/{cohort}/update

POST

cohort, {..}

Updates the given param inside body for a particular cohort


(tick)

(tick)

/{cohort}/delete

GET

cohort

Deletes given cohort


(tick)

(tick)

/{cohort}/annotationsets/create

POST

cohort, variableSetId, {JSON containing the annotation set name and the array of annotations. The name should be unique for the sample
}

Creates an annotation set for a particular user




/{cohort}/annotationsets/annotationsetName/info

GET

cohort, samplesetName

Fetches info related to Annotation Set




/{cohort}/annotationsets/annotationsetName/search

GET

cohort





/{cohort}/annotationsets/annotationsetName/updatePOST
cohort, anootationSetName {}



/{cohort}/annotationsets/annotationsetName/delete

GET

cohort, samplesetName

Deletes an Annotation Set




/{cohorts}/acl/create

POST

cohorts, {members}

Creates ACL for a list of samples


(tick)

(tick)

/{cohorts}/acl

GET

cohorts

Returns ACL related to samples


(tick)

(tick)

/{cohort}/acl/{memberId}/info

GET

cohortId,memberId

Get the ACL info related to the specified member


(tick)

(tick)

/{cohort}/acl/{memberId}/update

POST

cohort, memberId, {add,set, remove}

Updates the ACL info related to a specified member


(tick)

(tick)

/{cohort}/acl/{memberId}/delete

GET

cohorts, memberId

Removes the ACL related to asample(s) of a specified member


(tick)(tick)

Samples


Path (/samples)


HTTP Method


Parameters


Description

OpenCGA Version

1.0 (Feb. 2017)

1.1 (May 2017)

1.2(Jul 2017)

/create

POST

study, { name...}

Creates a new sample with data provided in body


(tick)

(tick)
/loadGETfileLoad samples from a file


/{samples}/info

GET

samples

Gets sample information


(tick)

(tick)

/{samples}/search

GET

name, source, individual.id, annotationSsetName, variableSetId, Annotation

Search the sample using different combination of available fields


(tick)

(tick)

/{samples}/groupBy

GET

fields, name, individual.id, annotationSetName, variableSetId, Annotation

Returns data into group based on fields provided


(tick)

(tick)

/{sample}/update

POST

sample, {..}

Updates the given param inside body for a particular sample


(tick)

(tick)

/{samples}/delete

GET

samples

Deletes samples information


(tick)

(tick)

/{sample}/annotationsets/create

POST

sample, variableSetId, {JSON containing the annotation set name and the array of annotations. The name should be unique for the sample
}

Creates an annotation set for a particular user


(tick)

(tick)

/{sample}/annotationsets/annotationsetName/info

GET

sample, samplesetName

Fetches info related to Annotation Set




/{sample}/annotationsets/annotationsetName/search

GET

sample





/{sample}/annotationsets/annotationsetName/updateGETsample, anootationSetName {}



/{sample}/annotationsets/annotationsetName/delete

GET

sample, samplesetName

Deletes an Annotation Set




/{samples}/acl/create

POST

samples, {members}

Creates ACL for a list of samples


(tick)

(tick)

/{samples}/acl

GET

samples

Returns ACL related to samples




/{samples}/acl/{memberId}/info

GET

sampleId,memberId

Get the ACL info related to the specified member


(tick)

(tick)

/{sample}/acl/{memberId}/update

POST

sample, memberId, {add,set, remove}

Updates the ACL info related to a specified member


(tick)

(tick)

/{samples}/acl/{memberId}/delete

GET

samples, memberId

Removes the ACL related to asample(s) of a specified member


(tick)(tick)

VariableSet


Path (/variableset)


HTTP Method


Parameters


Description

OpenCGA Version

1.0 (Feb. 2017)

1.1 (May 2017)

1.2 (Jul 2017)

/create

POST

study, { name...}

Creates a new variable set with data provided in body


(tick)

(tick)

/{variableset}/info

GET

variableset

Gets variable Set information


(tick)

(tick)

/{variableset}/search

GET

name, id ....

Search for the the variable set using different combination of available fields


(tick)

(tick)

/{variableset}/update

POST

variableset, {..}

Updates the given param inside body for a particular variableSet




/{variableset}/field/add

POST

variableset

add a new field in variableSet


(tick)

(tick)
/{variableset}/field/renameGETvariableset, oldName, newNamerenames a given field in variable Set with new name
(tick)(tick)
/{variableset}/field/deleteGETvariableset, namedeletes a given field from vairableSet
(tick)(tick)

Meta


Path (/meta)


HTTP Method


Parameters


Description

OpenCGA Version

1.0 (Feb. 2017)

1.1 (May 2017)

1.2 ( Jul 2017)

/about

GET


Gets information related to OpenCGA version, branch, commit


(tick)

(tick)

/ping

GET


returns pong, simplest way to see if REST is up and running


(tick)

(tick)

/status

GET


returns OK in case of system working properly


(tick)

(tick)

Families


Path (/families)


HTTP Method


Parameters


Description

OpenCGA Version

1.0 (Feb. 2017)

1.1 (May 2017)

1.2 (Jul 2017)

/create

POST

study, { name...}

Creates a new family with data provided in body


(tick)

(tick)

/{families}/info

GET

familyId(s)

Gets Families information


(tick)

(tick)

/search

GET

study, name, mother, father, children, ...

Search for the families using different combination of available fields


(tick)

(tick)

/{family}/update

POST

family, {..}

Updates the given param inside body for a particular family


(tick)

(tick)

/{family}/annotationsets/create

POST

family, variableSetId, {JSON containing the annotation set name and the array of annotations. The name should be unique for the sample
}

Creates an annotation set for a particular user


(tick)

(tick)

/{family}/annotationsets/annotationsetName/info

GET

family, samplesetName

Fetches info related to Annotation Set


(tick)

(tick)

/{family}/annotationsets/annotationsetName/search

GET

family





/{family}/annotationsets/infoGETfamilyreturn the annotation sets for the family
(tick)(tick)
/{family}/annotationsets/annotationsetName/updatePOST
family, anootationSetName {}



/{family}/acl/{memberId}/update

POST

families, {members}

Creates/update ACL for a list of samples


(tick)

(tick)

/{families}/acl

GET

families

Returns ACL related to samples


(tick)

(tick)

Table of Contents:

  • No labels