<commit_before>!define TEST_SYSTEM {slim}


!|Table: Rest Fixture | $baseURL |
|let|analyst|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|ROU|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|admin|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|projectA|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|projectAAlias|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|projectB|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|projectBAlias|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|studyA|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|studyAAlias|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|studyB|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|studyBAlias|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|iA1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)|| 
|let|iA2|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|iA3|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|iB1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|sA1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)|| 
|let|sA2|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|sA3|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|sB1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|vsA1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)|| 
|let|vsA2|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|vsA3|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|vsB1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|cA1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)|| 
|let|cA2|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|cA3|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|cB1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|asA1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|asA2|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|asA3|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|asB1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||

!3 Create Analyst User
!|Table: Rest Fixture  | $baseURL |
| setBody |  { "name": "$analyst", "userId": "$analyst","email": "<EMAIL>", "password" : "<PASSWORD>" }|
| setHeader|Content-Type:application/json|
| POST | /v1/users/create?sid=$sessionId |200| Content-Type : application/json| jsonbody.error === '' |

!3 Create Read Only User (ROU)
!|Table: Rest Fixture  | $baseURL |
| setBody |  { "name": "$ROU", "userId": "$ROU","email": "<EMAIL>", "password" : "<PASSWORD>" }|
| setHeader|Content-Type:application/json|
| POST | /v1/users/create?sid=$sessionId |200| Content-Type : application/json| jsonbody.error === '' |

!3 Create Admin User
!|Table: Rest Fixture  | $baseURL |
| setBody |  { "name": "$admin", "userId": "$admin","email": "<EMAIL>", "password" : "<PASSWORD>" }|
| setHeader|Content-Type:application/json|
| POST | /v1/users/create?sid=$sessionId |200| Content-Type : application/json| jsonbody.error === '' |

!3 Login Admin 
!|Table: Rest Fixture | http://bioinfoint.hpc.cam.ac.uk/opencga-1.0.0-final/webservices/rest/  |
| setBody | {"password" : "<PASSWORD>"}|
| setHeader|Content-Type:application/json|
| POST | /v1/users/$admin/login |200|  Content-Type: application/json ||
|let|adminSessionId|js|response.jsonbody.response[0].result[0].sessionId||

!3 Login Analyst 
!|Table: Rest Fixture | http://bioinfoint.hpc.cam.ac.uk/opencga-1.0.0-final/webservices/rest/  |
| setBody | {"password" : "<PASSWORD>"}|
| setHeader|Content-Type:application/json|
| POST | /v1/users/$analyst/login |200|  Content-Type: application/json ||
|let|analystSessionId|js|response.jsonbody.response[0].result[0].sessionId||

!3 Login Read Only User 
!|Table: Rest Fixture | http://bioinfoint.hpc.cam.ac.uk/opencga-1.0.0-final/webservices/rest/  |
| setBody | {"password" : "<PASSWORD>"}|
| setHeader|Content-Type:application/json|
| POST | /v1/users/$ROU/login |200|  Content-Type: application/json ||
|let|ROUSessionId|js|response.jsonbody.response[0].result[0].sessionId||

!3 Login user A 
!|Table: Rest Fixture | http://bioinfoint.hpc.cam.ac.uk/opencga-1.0.0-final/webservices/rest/  |
| setBody | {"password" : "<PASSWORD>"}|
| setHeader|Content-Type:application/json|
| POST | /v1/users/$userA/login |200|  Content-Type: application/json ||
|let|userASessionId|js|response.jsonbody.response[0].result[0].sessionId||

!3 Login user B 
!|Table: Rest Fixture | http://bioinfoint.hpc.cam.ac.uk/opencga-1.0.0-final/webservices/rest/  |
| setBody | {"password" : "<PASSWORD>"}|
| setHeader|Content-Type:application/json|
| POST | /v1/users/$userB/login |200|  Content-Type: application/json ||
|let|userBSessionId|js|response.jsonbody.response[0].result[0].sessionId||<commit_msg>Test: Replaced hardcoded value with variables in setup<commit_after>!define TEST_SYSTEM {slim}


!|Table: Rest Fixture | $baseURL |
|let|analyst|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|ROU|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|admin|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|projectA|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|projectAAlias|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|projectB|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|projectBAlias|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|studyA|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|studyAAlias|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|studyB|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|studyBAlias|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|iA1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)|| 
|let|iA2|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|iA3|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|iB1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|sA1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)|| 
|let|sA2|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|sA3|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|sB1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|vsA1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)|| 
|let|vsA2|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|vsA3|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|vsB1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|cA1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)|| 
|let|cA2|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|cA3|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|cB1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|asA1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|asA2|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|asA3|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|asB1|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||

!3 Create Analyst User
!|Table: Rest Fixture  | $baseURL |
| setBody |  { "name": "$analyst", "userId": "$analyst","email": "<EMAIL>", "password" : "<PASSWORD>" }|
| setHeader|Content-Type:application/json|
| POST | /v1/users/create?sid=$sessionId |200| Content-Type : application/json| jsonbody.error === '' |

!3 Create Read Only User (ROU)
!|Table: Rest Fixture  | $baseURL |
| setBody |  { "name": "$ROU", "userId": "$ROU","email": "<EMAIL>", "password" : "<PASSWORD>" }|
| setHeader|Content-Type:application/json|
| POST | /v1/users/create?sid=$sessionId |200| Content-Type : application/json| jsonbody.error === '' |

!3 Create Admin User
!|Table: Rest Fixture  | $baseURL |
| setBody |  { "name": "$admin", "userId": "$admin","email": "<EMAIL>", "password" : "<PASSWORD>" }|
| setHeader|Content-Type:application/json|
| POST | /v1/users/create?sid=$sessionId |200| Content-Type : application/json| jsonbody.error === '' |

!3 Login Admin 
!|Table: Rest Fixture | $baseURL  |
| setBody | {"password" : "<PASSWORD>"}|
| setHeader|Content-Type:application/json|
| POST | /v1/users/$admin/login |200|  Content-Type: application/json ||
|let|adminSessionId|js|response.jsonbody.response[0].result[0].sessionId||

!3 Login Analyst 
!|Table: Rest Fixture | $baseURL  |
| setBody | {"password" : "<PASSWORD>"}|
| setHeader|Content-Type:application/json|
| POST | /v1/users/$analyst/login |200|  Content-Type: application/json ||
|let|analystSessionId|js|response.jsonbody.response[0].result[0].sessionId||

!3 Login Read Only User 
!|Table: Rest Fixture | $baseURL  |
| setBody | {"password" : "<PASSWORD>"}|
| setHeader|Content-Type:application/json|
| POST | /v1/users/$ROU/login |200|  Content-Type: application/json ||
|let|ROUSessionId|js|response.jsonbody.response[0].result[0].sessionId||

!3 Login user A 
!|Table: Rest Fixture | $baseURL  |
| setBody | {"password" : "<PASSWORD>"}|
| setHeader|Content-Type:application/json|
| POST | /v1/users/$userA/login |200|  Content-Type: application/json ||
|let|userASessionId|js|response.jsonbody.response[0].result[0].sessionId||

!3 Login user B 
!|Table: Rest Fixture | $baseURL  |
| setBody | {"password" : "<PASSWORD>"}|
| setHeader|Content-Type:application/json|
| POST | /v1/users/$userB/login |200|  Content-Type: application/json ||
|let|userBSessionId|js|response.jsonbody.response[0].result[0].sessionId||
{'fraction_non_alphanumeric': 0.27690955264700134, 'fraction_numerical': 0.0393631568665755, 'mean_word_length': 6.080912863070539, 'pattern_counts': {'":': 18, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4632553', 'n_tokens_mistral': 4412, 'n_tokens_neox': 4175, 'n_words': 526}