Preparing Tests ...

Test Summaries

Test output

Test System: slim:fitnesse.slim.SlimService

SuiteSetUp Top


Setup import and scripts

import
se.uu.ub.cora.fitnesseintegration
se.uu.ub.cora.fitnesseintegration.apptoken.script
se.uu.ub.cora.fitnesseintegration.authtoken.fixture
se.uu.ub.cora.fitnesseintegration.file
se.uu.ub.cora.fitnesseintegration.compare
se.uu.ub.cora.fitnesseintegration.script
se.uu.ub.cora.fitnesseintegration.waiter.fixture
se.uu.ub.cora.fitnesseintegration.server.compare.fixtures
se.uu.ub.cora.fitnesseintegration.binary
se.uu.ub.diva.cora.fitnesse

script SystemUrl
setUrl http://diva:8080/diva/
setAppTokenVerifierUrl http://login:8080/login/
setIdpLoginUrl http://idplogin:8080/idplogin/
setGatekeeperServerUrl http://gatekeeper:8080/gatekeeperserver/

script DependencyProvider
setHttpHandlerFactoryClassName se.uu.ub.cora.httphandler.HttpHandlerFactoryImp
setChildComparerUsingClassName se.uu.ub.cora.fitnesseintegration.ChildComparerImp
setComparerFactoryUsingClassName se.uu.ub.cora.fitnesseintegration.compare.ComparerFactoryImp


Import classes through pom.xml

Maven classpath [file: ./pom.xml, scope: test]:

  • Unable to parse POM file: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com.google.inject.ProvisionException: Guice provision errors: 1) No implementation for org.apache.maven.repository.RepositorySystem was bound. while locating org.apache.maven.execution.DefaultMavenExecutionRequestPopulator at ClassRealm[maven, parent: ClassRealm[maven-parent, parent: null]] at ClassRealm[maven, parent: ClassRealm[maven-parent, parent: null]] while locating org.apache.maven.execution.MavenExecutionRequestPopulator 1 error role: org.apache.maven.execution.MavenExecutionRequestPopulator roleHint:

SuiteSetUp Top



Setup login


Login for admin


AppTokenEndpointFixture
userId appToken getAuthTokenForAppToken? getAuthToken? getStatusType?
coraUser:1299694997493014 f48a2fb3-814e-404a-a2dd-9860aff4e328 {"data":{"children":[{"name":"id","value":"c7d8cbc9-03ca-470c-a5d3-f17171b918c2"},{"name":"validForNoSeconds","value":"600"},{"name":"idInUserStorage","value":"coraUser:1299694997493014"},{"name":"idFromLogin","value":"coraUser:1299694997493014"},{"name":"firstName","value":"Everything"},{"name":"lastName","value":"DiVA Fitnesse"}],"name":"authToken"},"actionLinks":{"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://login:8080/diva/login/rest/authToken/coraUser:1299694997493014"}}} $adminAuthToken<-[c7d8cbc9-03ca-470c-a5d3-f17171b918c2] CREATED

script AuthTokenHolder
setAdminAuthToken $adminAuthToken->[c7d8cbc9-03ca-470c-a5d3-f17171b918c2]

Login for user


AppTokenEndpointFixture
userId appToken getAuthTokenForAppToken? getAuthToken? getStatusType?
121212 {"data":{"children":[{"name":"id","value":"b0fd150a-dc2b-4a36-aebd-3e41eaf3b565"},{"name":"validForNoSeconds","value":"600"},{"name":"idInUserStorage","value":"121212"},{"name":"idFromLogin","value":"121212"},{"name":"firstName","value":"Fitnesse"},{"name":"lastName","value":"User"}],"name":"authToken"},"actionLinks":{"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://login:8080/diva/login/rest/authToken/121212"}}} $userAuthToken<-[b0fd150a-dc2b-4a36-aebd-3e41eaf3b565] CREATED

script AuthTokenHolder
setUserAuthToken $userAuthToken->[b0fd150a-dc2b-4a36-aebd-3e41eaf3b565]

Login for DiVA example users

Hämta authTokens från idpLogin server


IdpLoginServletFixture
EPPN getAuthTokenForEPPN? getIdFromLogin? getResponseCode? getAuthToken? getValidForNoSeconds? getDeleteUrl?
fitnesseSystemAdmin@user.uu.se <!DOCTYPE html> <html><head> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> <script type="text/javascript"> window.onload = start; function start() { var authInfo = { "userId" : "fitnesseSystemAdmin@user.uu.se", "token" : "3c491d76\-9b85\-448b\-bf09\-8d938185fd29", "idFromLogin" : "fitnesseSystemAdmin@user.uu.se", "validForNoSeconds" : "600", "actionLinks" : { "delete" : { "requestMethod" : "DELETE", "rel" : "delete", "url" : "https:\/\/cora.epc.ub.uu.se\/diva\/login\/rest\/apptoken\/coraUser:542161975513761" } } }; if(null!=window.opener){ window.opener.postMessage(authInfo, "https:\/\/cora.epc.ub.uu.se"); window.opener.focus(); window.close(); } } </script> <body> token: 3c491d76-9b85-448b-bf09-8d938185fd29 </body></html> fitnesseSystemAdmin@user.uu.se OK $systemAdminAuthToken<-[3c491d76-9b85-448b-bf09-8d938185fd29] 600 https://cora.epc.ub.uu.se/diva/login/rest/apptoken/coraUser:542161975513761
fitnesseDomainAdminUU@user.uu.se <!DOCTYPE html> <html><head> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> <script type="text/javascript"> window.onload = start; function start() { var authInfo = { "userId" : "fitnesseDomainAdminUU@user.uu.se", "token" : "12a0a87c\-f45e\-4a65\-8b9a\-ae1ffe125ba2", "idFromLogin" : "fitnesseDomainAdminUU@user.uu.se", "validForNoSeconds" : "600", "actionLinks" : { "delete" : { "requestMethod" : "DELETE", "rel" : "delete", "url" : "https:\/\/cora.epc.ub.uu.se\/diva\/login\/rest\/apptoken\/coraUser:542165753711000" } } }; if(null!=window.opener){ window.opener.postMessage(authInfo, "https:\/\/cora.epc.ub.uu.se"); window.opener.focus(); window.close(); } } </script> <body> token: 12a0a87c-f45e-4a65-8b9a-ae1ffe125ba2 </body></html> fitnesseDomainAdminUU@user.uu.se OK $domainAdminUUAuthToken<-[12a0a87c-f45e-4a65-8b9a-ae1ffe125ba2] 600 https://cora.epc.ub.uu.se/diva/login/rest/apptoken/coraUser:542165753711000
fitnesseDomainAdminKTH@user.kth.se <!DOCTYPE html> <html><head> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> <script type="text/javascript"> window.onload = start; function start() { var authInfo = { "userId" : "fitnesseDomainAdminKTH@user.kth.se", "token" : "1cb8193b\-826b\-41b5\-aed8\-db2537065bcd", "idFromLogin" : "fitnesseDomainAdminKTH@user.kth.se", "validForNoSeconds" : "600", "actionLinks" : { "delete" : { "requestMethod" : "DELETE", "rel" : "delete", "url" : "https:\/\/cora.epc.ub.uu.se\/diva\/login\/rest\/apptoken\/coraUser:542168680454562" } } }; if(null!=window.opener){ window.opener.postMessage(authInfo, "https:\/\/cora.epc.ub.uu.se"); window.opener.focus(); window.close(); } } </script> <body> token: 1cb8193b-826b-41b5-aed8-db2537065bcd </body></html> fitnesseDomainAdminKTH@user.kth.se OK $domainAdminKTHAuthToken<-[1cb8193b-826b-41b5-aed8-db2537065bcd] 600 https://cora.epc.ub.uu.se/diva/login/rest/apptoken/coraUser:542168680454562
userNotInDb@user.uu.se <!DOCTYPE html> <html><head> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> <script type="text/javascript"> window.onload = start; function start() { var authInfo = { "userId" : "null", "token" : "2dcfa8b9\-cee6\-48bb\-884a\-5c25b76c0053", "idFromLogin" : "null", "validForNoSeconds" : "600", "actionLinks" : { "delete" : { "requestMethod" : "DELETE", "rel" : "delete", "url" : "https:\/\/cora.epc.ub.uu.se\/diva\/login\/rest\/apptoken\/coraUser:5368656924943436" } } }; if(null!=window.opener){ window.opener.postMessage(authInfo, "https:\/\/cora.epc.ub.uu.se"); window.opener.focus(); window.close(); } } </script> <body> token: 2dcfa8b9-cee6-48bb-884a-5c25b76c0053 </body></html> null OK $guestToken<-[2dcfa8b9-cee6-48bb-884a-5c25b76c0053] 600 https://cora.epc.ub.uu.se/diva/login/rest/apptoken/coraUser:5368656924943436


BasicFunctionalityForDivaUsers.IndexBatchJob Top


IndexBatchJob


Det ska gå att skapa, läsa, uppdatera, radera, indexera och söka ett IndexBatchJob. Använderen borde inte skapa ett IndexBatchJob via create-endpointen, men den behöver ändå ha rättigheter att göra så, för att det annars inte är möjligt att skapa ett IndexBatchJob via indexRecordList-endpointen.
I nuläget har vi inget sök definerat för posttypen IndexBatchJob, vilket är varför vi inte kan test varken sök eller indexering av poster av typen IndexBatchJob.

variable defined: recordType=indexBatchJob
variable defined: createData=!-{"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"}-!
variable defined: updateData=!-{"children":[{"children":[{"name":"ignoreOverwriteProtection","value":"true"},{"name":"id","value":"-!${recordId}!-"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"}-!
variable defined: expectedCompareResult=OK

variable defined: currentAuthToken=$adminAuthToken

Det ska gå att skapa ett IndexBatchJob genom create-endpointen


RecordEndpointFixture
authToken type json testCreateRecord? getCreatedId? getStatusType?
$adminAuthToken indexBatchJob {"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} {"record":{"data":{"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/cora","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"name":"id","value":"indexBatchJob:1423876818924992"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:15.211155Z"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:15.211155Z"}],"name":"updated"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423876818924992","accept":"application/vnd.uub.record+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423876818924992","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"recordType"},{"name":"recordId","value":"indexBatchJob:1423876818924992"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"},"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423876818924992"}}}} $createdId<-[indexBatchJob:1423876818924992] CREATED
variable defined: recordId=$createdId

Det ska gå att läsa ett IndexBatchJob

variable defined: expectedUpdatedData=${createData}

Read record indexBatchJob $createdId


ChildComparerFixture
authToken type id testReadAndStoreRecord?
$adminAuthToken indexBatchJob $createdId->[indexBatchJob:1423876818924992] {"record":{"data":{"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/cora","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"name":"id","value":"indexBatchJob:1423876818924992"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:15.211155Z"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:15.211155Z"}],"name":"updated"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423876818924992","accept":"application/vnd.uub.record+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423876818924992","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"recordType"},{"name":"recordId","value":"indexBatchJob:1423876818924992"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"},"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423876818924992"}}}}

Validate the response returned on the read call contains the expected record parts.

Compare record data $createdId


ChildComparerFixture
children testCheckContainWithValues?
{"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} OK


Det ska gå att uppdatera ett IndexBatchJob

RecordEndpointFixture
authToken type id json testUpdateRecord? getStatusType?
$adminAuthToken indexBatchJob $createdId->[indexBatchJob:1423876818924992] {"children":[{"children":[{"name":"ignoreOverwriteProtection","value":"true"},{"name":"id","value":"$createdId->[indexBatchJob:1423876818924992]"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} {"record":{"data":{"children":[{"children":[{"name":"id","value":"indexBatchJob:1423876818924992"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/cora","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:15.211155Z"}],"name":"updated"},{"repeatId":"1","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:15.487283Z"}],"name":"updated"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:15.211155Z"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423876818924992","accept":"application/vnd.uub.record+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423876818924992","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"recordType"},{"name":"recordId","value":"indexBatchJob:1423876818924992"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"},"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423876818924992"}}}} OK


Läs posten och kolla att uppdateringen gick igenom

variable defined: expectedUpdatedData=!-{"children":[{"children":[{"name":"id","value":"-!${recordId}!-"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"}-!

Read record indexBatchJob $createdId


ChildComparerFixture
authToken type id testReadAndStoreRecord?
$adminAuthToken indexBatchJob $createdId->[indexBatchJob:1423876818924992] {"record":{"data":{"children":[{"children":[{"name":"id","value":"indexBatchJob:1423876818924992"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/cora","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:15.211155Z"}],"name":"updated"},{"repeatId":"1","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:15.487283Z"}],"name":"updated"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:15.211155Z"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423876818924992","accept":"application/vnd.uub.record+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423876818924992","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"recordType"},{"name":"recordId","value":"indexBatchJob:1423876818924992"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"},"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423876818924992"}}}}

Validate the response returned on the read call contains the expected record parts.

Compare record data $createdId


ChildComparerFixture
children testCheckContainWithValues?
{"children":[{"children":[{"name":"id","value":"$createdId->[indexBatchJob:1423876818924992]"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} OK


Det ska gå att radera ett IndexBatchJob

RecordEndpointFixture
authToken type id testDeleteRecord? getStatusType?
$adminAuthToken indexBatchJob $createdId->[indexBatchJob:1423876818924992] BLANK OK


Roller


SystemAdmin

variable defined: currentUserRole=!-SystemAdmin-!
variable defined: currentAuthToken=$systemAdminAuthToken

SystemAdmin ska kunna skapa en post av typ IndexBatchJob


RecordEndpointFixture
authToken type json testCreateRecord? getCreatedId? getStatusType?
$systemAdminAuthToken indexBatchJob {"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} {"record":{"data":{"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/cora","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"name":"id","value":"indexBatchJob:1423877449719441"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:542161975513761"}],"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:15.841949Z"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:542161975513761"}],"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:15.841949Z"}],"name":"updated"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423877449719441","accept":"application/vnd.uub.record+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423877449719441","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"recordType"},{"name":"recordId","value":"indexBatchJob:1423877449719441"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"},"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423877449719441"}}}} $createdId<-[indexBatchJob:1423877449719441] CREATED
variable defined: recordId=$createdId

SystemAdmin ska kunna läsa en post av typ IndexBatchJob

variable defined: expectedUpdatedData=${createData}

Read record indexBatchJob $createdId


ChildComparerFixture
authToken type id testReadAndStoreRecord?
$systemAdminAuthToken indexBatchJob $createdId->[indexBatchJob:1423877449719441] {"record":{"data":{"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/cora","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"name":"id","value":"indexBatchJob:1423877449719441"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:542161975513761"}],"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:15.841949Z"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:542161975513761"}],"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:15.841949Z"}],"name":"updated"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423877449719441","accept":"application/vnd.uub.record+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423877449719441","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"recordType"},{"name":"recordId","value":"indexBatchJob:1423877449719441"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"},"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423877449719441"}}}}

Validate the response returned on the read call contains the expected record parts.

Compare record data $createdId


ChildComparerFixture
children testCheckContainWithValues?
{"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} OK


SystemAdmin ska kunna uppdatera en post av typ IndexBatchJob


RecordEndpointFixture
authToken type id json testUpdateRecord? getStatusType?
$systemAdminAuthToken indexBatchJob $createdId->[indexBatchJob:1423877449719441] {"children":[{"children":[{"name":"ignoreOverwriteProtection","value":"true"},{"name":"id","value":"$createdId->[indexBatchJob:1423877449719441]"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} {"record":{"data":{"children":[{"children":[{"name":"id","value":"indexBatchJob:1423877449719441"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/cora","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:542161975513761"}],"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:15.841949Z"}],"name":"updated"},{"repeatId":"1","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:542161975513761"}],"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:16.056379Z"}],"name":"updated"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:542161975513761"}],"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:15.841949Z"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423877449719441","accept":"application/vnd.uub.record+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423877449719441","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"recordType"},{"name":"recordId","value":"indexBatchJob:1423877449719441"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"},"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423877449719441"}}}} OK


Läs posten och kolla att uppdateringen gick igenom

variable defined: expectedUpdatedData=!-{"children":[{"children":[{"name":"id","value":"-!${recordId}!-"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"}-!

Read record indexBatchJob $createdId


ChildComparerFixture
authToken type id testReadAndStoreRecord?
$systemAdminAuthToken indexBatchJob $createdId->[indexBatchJob:1423877449719441] {"record":{"data":{"children":[{"children":[{"name":"id","value":"indexBatchJob:1423877449719441"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/cora","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:542161975513761"}],"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:15.841949Z"}],"name":"updated"},{"repeatId":"1","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:542161975513761"}],"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:16.056379Z"}],"name":"updated"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:542161975513761"}],"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:15.841949Z"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423877449719441","accept":"application/vnd.uub.record+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423877449719441","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"recordType"},{"name":"recordId","value":"indexBatchJob:1423877449719441"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"},"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423877449719441"}}}}

Validera att svaretläsanropet innehåller det förväntade datat

Compare record data $createdId


ChildComparerFixture
children testCheckContainWithValues?
{"children":[{"children":[{"name":"id","value":"$createdId->[indexBatchJob:1423877449719441]"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} OK


SystemAdmin ska kunna radera en post av typ IndexBatchJob

RecordEndpointFixture
authToken type id testDeleteRecord? getStatusType?
$systemAdminAuthToken indexBatchJob $createdId->[indexBatchJob:1423877449719441] BLANK OK


Skapa ett IndexBatchJob för read-, update- och delete-testerna för DomainAdmin och Guest

RecordEndpointFixture
authToken type json testCreateRecord? getCreatedId? getStatusType?
$adminAuthToken indexBatchJob {"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} {"record":{"data":{"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/cora","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"name":"id","value":"indexBatchJob:1423878026475377"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/indexBatchJob","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:16.418713Z"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:16.418713Z"}],"name":"updated"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423878026475377","accept":"application/vnd.uub.record+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423878026475377","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"recordType"},{"name":"recordId","value":"indexBatchJob:1423878026475377"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"},"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://diva:8080/diva/rest/record/indexBatchJob/indexBatchJob:1423878026475377"}}}} $createdId<-[indexBatchJob:1423878026475377] CREATED
variable defined: recordId=$createdId


DomainAdmin

variable defined: currentUserRole=!-DomainAdmin-!
variable defined: currentAuthToken=$domainAdminAuthToken

DomainAdmin ska inte kunna skapa en post av typ IndexBatchJob


RecordEndpointFixture
authToken type json testCreateRecord? getCreatedId? getStatusType?
$domainAdminAuthToken indexBatchJob {"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} <!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Unauthorized</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/10.0.20</h3></body></html> null UNAUTHORIZED

DomainAdmin ska inte kunna läsa en post av typ IndexBatchJob

RecordEndpointFixture
authToken type id testReadRecord? getStatusType?
$domainAdminAuthToken indexBatchJob $createdId->[indexBatchJob:1423878026475377] <!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Unauthorized</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/10.0.20</h3></body></html> UNAUTHORIZED


DomainAdmin ska inte kunna uppdatera en post av typ IndexBatchJob

RecordEndpointFixture
authToken type id json testUpdateRecord? getStatusType?
$domainAdminAuthToken indexBatchJob $createdId->[indexBatchJob:1423878026475377] {"children":[{"children":[{"name":"ignoreOverwriteProtection","value":"true"},{"name":"id","value":"$createdId->[indexBatchJob:1423878026475377]"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} <!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Unauthorized</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/10.0.20</h3></body></html> UNAUTHORIZED


DomainAdmin ska inte kunna radera en post av typ IndexBatchJob

RecordEndpointFixture
authToken type id testDeleteRecord? getStatusType?
$domainAdminAuthToken indexBatchJob $createdId->[indexBatchJob:1423878026475377] <!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Unauthorized</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/10.0.20</h3></body></html> UNAUTHORIZED


Guest

variable defined: currentUserRole=!-Guest-!
variable defined: currentAuthToken=$guestAuthToken

Guest ska inte kunna skapa en post av typ IndexBatchJob


RecordEndpointFixture
authToken type json testCreateRecord? getCreatedId? getStatusType?
$guestAuthToken indexBatchJob {"children":[{"children":[{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"name":"recordTypeToIndex","value":"metadataNumberVariable"},{"name":"totalNumberToIndex","value":"2"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} <!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Unauthorized</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/10.0.20</h3></body></html> null UNAUTHORIZED

Guest ska inte kunna läsa en post av typ IndexBatchJob

RecordEndpointFixture
authToken type id testReadRecord? getStatusType?
$guestAuthToken indexBatchJob $createdId->[indexBatchJob:1423878026475377] <!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Unauthorized</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/10.0.20</h3></body></html> UNAUTHORIZED


Guest ska inte kunna uppdatera en post av typ IndexBatchJob

RecordEndpointFixture
authToken type id json testUpdateRecord? getStatusType?
$guestAuthToken indexBatchJob $createdId->[indexBatchJob:1423878026475377] {"children":[{"children":[{"name":"ignoreOverwriteProtection","value":"true"},{"name":"id","value":"$createdId->[indexBatchJob:1423878026475377]"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"type"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"cora"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"indexBatchJob"}],"name":"validationType"}],"name":"recordInfo"},{"children":[{"name":"fromNo","value":"1"},{"name":"toNo","value":"4"}],"name":"filter"},{"name":"recordTypeToIndex","value":"metadataTextVariable"},{"name":"totalNumberToIndex","value":"4"},{"name":"numberOfProcessedRecords","value":"0"},{"name":"status","value":"started"}],"name":"indexBatchJob"} <!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Unauthorized</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/10.0.20</h3></body></html> UNAUTHORIZED


Guest ska inte kunna radera en post av typ IndexBatchJob

RecordEndpointFixture
authToken type id testDeleteRecord? getStatusType?
$guestAuthToken indexBatchJob $createdId->[indexBatchJob:1423878026475377] <!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Unauthorized</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/10.0.20</h3></body></html> UNAUTHORIZED


Radera IndexBatchJobbet som skapades för att testa read-, update- och delete för DomainAdmin och Guest


RecordEndpointFixture
authToken type id testDeleteRecord? getStatusType?
$adminAuthToken indexBatchJob $createdId->[indexBatchJob:1423878026475377] BLANK OK


MetaCreator.MetadataTextVariable Top


Testing metacompleter and creator for metadataTextVariable

If text ids are not provided when creating a metadataTextVariable, the text ids are added and the texts are created in storage if they do not already exist.

Read texts to make sure they do not exist

Read fitnesseTestTextVarText and fitnesseTestTextVarDefText


RecordEndpointFixture
id type testReadRecord? getStatusType?
fitnesseTestTextVarText text Error reading record with recordType: text and recordId: fitnesseTestTextVarText. No record exists with recordId: fitnesseTestTextVarText NOT_FOUND
fitnesseTestTextVarDefText text Error reading record with recordType: text and recordId: fitnesseTestTextVarDefText. No record exists with recordId: fitnesseTestTextVarDefText NOT_FOUND

When a metadataTextVariable is created, two presentationVars are automatically created, one for input and one for output.

Read pVars to make sure they do not exist

Read fitnesseTestPVar and fitnesseTestOutputPVar


RecordEndpointFixture
id type testReadRecord? getStatusType?
fitnesseTestPVar presentation Error reading record with recordType: presentation and recordId: fitnesseTestPVar. No record exists with recordId: fitnesseTestPVar NOT_FOUND
fitnesseTestOutputPVar presentation Error reading record with recordType: presentation and recordId: fitnesseTestOutputPVar. No record exists with recordId: fitnesseTestOutputPVar NOT_FOUND

Create a new metadataTextVariable

Create a new metadataTextVariable (fitnesseTestTextVar)


RecordEndpointFixture
authToken type json testCreateRecord? getStatusType?
$adminAuthToken metadata {"children":[{"children":[{"name":"id","value":"fitnesseTestTextVar"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"diva"}],"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"metadataTextVariable"}],"name":"validationType"}],"name":"recordInfo"},{"name":"nameInData","value":"fintnesseTest"},{"name":"regEx","value":"(^[0-9A-Za-z:-_]{2,50}$)"}],"name":"metadata","attributes":{"type":"textVariable"}} {"record":{"data":{"children":[{"children":[{"name":"id","value":"fitnesseTestTextVar"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"diva"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/diva","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"metadataTextVariable"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/metadataTextVariable","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"metadata"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/metadata","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:17.090956Z"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:17.090956Z"}],"name":"updated"}],"name":"recordInfo"},{"name":"nameInData","value":"fintnesseTest"},{"name":"regEx","value":"(^[0-9A-Za-z:-_]{2,50}$)"},{"children":[{"name":"linkedRecordType","value":"text"},{"name":"linkedRecordId","value":"fitnesseTestTextVarText"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/text/fitnesseTestTextVarText","accept":"application/vnd.uub.record+json"}},"name":"textId"},{"children":[{"name":"linkedRecordType","value":"text"},{"name":"linkedRecordId","value":"fitnesseTestTextVarDefText"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/text/fitnesseTestTextVarDefText","accept":"application/vnd.uub.record+json"}},"name":"defTextId"}],"name":"metadata","attributes":{"type":"textVariable"}},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/metadata/fitnesseTestTextVar","accept":"application/vnd.uub.record+json"},"read_incoming_links":{"requestMethod":"GET","rel":"read_incoming_links","url":"http://diva:8080/diva/rest/record/metadata/fitnesseTestTextVar/incomingLinks","accept":"application/vnd.uub.recordList+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/metadata/fitnesseTestTextVar","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"metadata"}],"name":"recordType"},{"name":"recordId","value":"fitnesseTestTextVar"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"}}}} CREATED

Read fitnesseTestTextVar to see that links to texts have been added to the metadata

Read fitnesseTestTextVar


RecordEndpointFixture
id type testReadRecord? getStatusType?
fitnesseTestTextVar metadata /"name":"id","value":"fitnesseTestTextVar"/ found in: {"record":{"data":{"children":[{"children":[{"name":"id","value":"fitnesseTestTextVar"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"diva"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/diva","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"metadataTextVariable"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/metadataTextVariable","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"metadata"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/metadata","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:17.090956Z"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:17.090956Z"}],"name":"updated"}],"name":"recordInfo"},{"name":"nameInData","value":"fintnesseTest"},{"name":"regEx","value":"(^[0-9A-Za-z:-_]{2,50}$)"},{"children":[{"name":"linkedRecordType","value":"text"},{"name":"linkedRecordId","value":"fitnesseTestTextVarText"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/text/fitnesseTestTextVarText","accept":"application/vnd.uub.record+json"}},"name":"textId"},{"children":[{"name":"linkedRecordType","value":"text"},{"name":"linkedRecordId","value":"fitnesseTestTextVarDefText"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/text/fitnesseTestTextVarDefText","accept":"application/vnd.uub.record+json"}},"name":"defTextId"}],"name":"metadata","attributes":{"type":"textVariable"}},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/metadata/fitnesseTestTextVar","accept":"application/vnd.uub.record+json"},"read_incoming_links":{"requestMethod":"GET","rel":"read_incoming_links","url":"http://diva:8080/diva/rest/record/metadata/fitnesseTestTextVar/incomingLinks","accept":"application/vnd.uub.recordList+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/metadata/fitnesseTestTextVar","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"metadata"}],"name":"recordType"},{"name":"recordId","value":"fitnesseTestTextVar"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"}}}} OK

Read texts again to see that they have been created as DiVA texts including lang no


Read fitnesseTestTextVarText and fitnesseTestTextVarDefText


variable defined: expectedReadData=!- {"name":"text","children":[{"name":"recordInfo","children":[{"name":"dataDivider","children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"diva"}]},{"name":"validationType","children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"divaText"}]}]},{"name":"textPart","children":[{"name":"text","value":"Text för:fitnesseTestTextVarText"}],"attributes":{"type":"default","lang":"sv"}},{"name":"textPart","children":[{"name":"text","value":"Text for:fitnesseTestTextVarText"}],"attributes":{"type":"alternative","lang":"en"}}]} -!
variable defined: expectedCompareResult=OK
ChildComparerFixture
authToken type id testReadAndStoreRecord? children testCheckContainWithValues?
$adminAuthToken text fitnesseTestTextVarText {"record":{"data":{"children":[{"children":[{"name":"id","value":"fitnesseTestTextVarText"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"diva"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/diva","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"divaText"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/divaText","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"text"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/text","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:16.855583Z"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:16.855583Z"}],"name":"updated"}],"name":"recordInfo"},{"children":[{"name":"text","value":"Text för:fitnesseTestTextVarText"}],"name":"textPart","attributes":{"lang":"sv","type":"default"}},{"children":[{"name":"text","value":"Text for:fitnesseTestTextVarText"}],"name":"textPart","attributes":{"lang":"en","type":"alternative"}}],"name":"text"},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/text/fitnesseTestTextVarText","accept":"application/vnd.uub.record+json"},"read_incoming_links":{"requestMethod":"GET","rel":"read_incoming_links","url":"http://diva:8080/diva/rest/record/text/fitnesseTestTextVarText/incomingLinks","accept":"application/vnd.uub.recordList+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/text/fitnesseTestTextVarText","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"text"}],"name":"recordType"},{"name":"recordId","value":"fitnesseTestTextVarText"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"}}}} {"name":"text","children":[{"name":"recordInfo","children":[{"name":"dataDivider","children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"diva"}]},{"name":"validationType","children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"divaText"}]}]},{"name":"textPart","children":[{"name":"text","value":"Text för:fitnesseTestTextVarText"}],"attributes":{"type":"default","lang":"sv"}},{"name":"textPart","children":[{"name":"text","value":"Text for:fitnesseTestTextVarText"}],"attributes":{"type":"alternative","lang":"en"}}]} OK

variable defined: expectedReadData=!- {"name":"text","children":[{"name":"recordInfo","children":[{"name":"dataDivider","children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"diva"}]},{"name":"validationType","children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"divaText"}]}]},{"name":"textPart","children":[{"name":"text","value":"Text för:fitnesseTestTextVarDefText"}],"attributes":{"type":"default","lang":"sv"}},{"name":"textPart","children":[{"name":"text","value":"Text for:fitnesseTestTextVarDefText"}],"attributes":{"type":"alternative","lang":"en"}}]} -!
variable defined: expectedCompareResult=OK
ChildComparerFixture
authToken type id testReadAndStoreRecord? children testCheckContainWithValues?
$adminAuthToken text fitnesseTestTextVarDefText {"record":{"data":{"children":[{"children":[{"name":"id","value":"fitnesseTestTextVarDefText"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"diva"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/diva","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"divaText"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/divaText","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"text"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/text","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:16.976221Z"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:16.976221Z"}],"name":"updated"}],"name":"recordInfo"},{"children":[{"name":"text","value":"Text för:fitnesseTestTextVarDefText"}],"name":"textPart","attributes":{"lang":"sv","type":"default"}},{"children":[{"name":"text","value":"Text for:fitnesseTestTextVarDefText"}],"name":"textPart","attributes":{"type":"alternative","lang":"en"}}],"name":"text"},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/text/fitnesseTestTextVarDefText","accept":"application/vnd.uub.record+json"},"read_incoming_links":{"requestMethod":"GET","rel":"read_incoming_links","url":"http://diva:8080/diva/rest/record/text/fitnesseTestTextVarDefText/incomingLinks","accept":"application/vnd.uub.recordList+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/text/fitnesseTestTextVarDefText","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"text"}],"name":"recordType"},{"name":"recordId","value":"fitnesseTestTextVarDefText"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"}}}} {"name":"text","children":[{"name":"recordInfo","children":[{"name":"dataDivider","children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"diva"}]},{"name":"validationType","children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"divaText"}]}]},{"name":"textPart","children":[{"name":"text","value":"Text för:fitnesseTestTextVarDefText"}],"attributes":{"type":"default","lang":"sv"}},{"name":"textPart","children":[{"name":"text","value":"Text for:fitnesseTestTextVarDefText"}],"attributes":{"type":"alternative","lang":"en"}}]} OK



Read presentationVars again to see that they have been created

Read fitnesseTestPVar and fitnesseTestOutputPVar


RecordEndpointFixture
id type testReadRecord? getStatusType?
fitnesseTestPVar presentation {"record":{"data":{"children":[{"children":[{"name":"id","value":"fitnesseTestPVar"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"diva"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/diva","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"presentationVar"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/presentationVar","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"presentation"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/presentation","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:17.193726Z"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:17.193726Z"}],"name":"updated"}],"name":"recordInfo"},{"children":[{"name":"linkedRecordType","value":"metadata"},{"name":"linkedRecordId","value":"fitnesseTestTextVar"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/metadata/fitnesseTestTextVar","accept":"application/vnd.uub.record+json"}},"name":"presentationOf"},{"name":"mode","value":"input"},{"name":"inputType","value":"input"}],"name":"presentation","attributes":{"type":"pVar"}},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/presentation/fitnesseTestPVar","accept":"application/vnd.uub.record+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/presentation/fitnesseTestPVar","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"presentation"}],"name":"recordType"},{"name":"recordId","value":"fitnesseTestPVar"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"},"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://diva:8080/diva/rest/record/presentation/fitnesseTestPVar"}}}} OK
fitnesseTestOutputPVar presentation {"record":{"data":{"children":[{"children":[{"name":"id","value":"fitnesseTestOutputPVar"},{"children":[{"name":"linkedRecordType","value":"system"},{"name":"linkedRecordId","value":"diva"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/system/diva","accept":"application/vnd.uub.record+json"}},"name":"dataDivider"},{"children":[{"name":"linkedRecordType","value":"validationType"},{"name":"linkedRecordId","value":"presentationVar"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/validationType/presentationVar","accept":"application/vnd.uub.record+json"}},"name":"validationType"},{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"presentation"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/recordType/presentation","accept":"application/vnd.uub.record+json"}},"name":"type"},{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"createdBy"},{"name":"tsCreated","value":"2024-05-16T22:45:17.316880Z"},{"repeatId":"0","children":[{"children":[{"name":"linkedRecordType","value":"user"},{"name":"linkedRecordId","value":"coraUser:1299694997493014"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/user/coraUser:1299694997493014","accept":"application/vnd.uub.record+json"}},"name":"updatedBy"},{"name":"tsUpdated","value":"2024-05-16T22:45:17.316880Z"}],"name":"updated"}],"name":"recordInfo"},{"children":[{"name":"linkedRecordType","value":"metadata"},{"name":"linkedRecordId","value":"fitnesseTestTextVar"}],"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/metadata/fitnesseTestTextVar","accept":"application/vnd.uub.record+json"}},"name":"presentationOf"},{"name":"mode","value":"output"},{"name":"inputType","value":"input"}],"name":"presentation","attributes":{"type":"pVar"}},"actionLinks":{"read":{"requestMethod":"GET","rel":"read","url":"http://diva:8080/diva/rest/record/presentation/fitnesseTestOutputPVar","accept":"application/vnd.uub.record+json"},"update":{"requestMethod":"POST","rel":"update","contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/presentation/fitnesseTestOutputPVar","accept":"application/vnd.uub.record+json"},"index":{"requestMethod":"POST","rel":"index","body":{"children":[{"children":[{"name":"linkedRecordType","value":"recordType"},{"name":"linkedRecordId","value":"presentation"}],"name":"recordType"},{"name":"recordId","value":"fitnesseTestOutputPVar"},{"name":"type","value":"index"}],"name":"workOrder"},"contentType":"application/vnd.uub.record+json","url":"http://diva:8080/diva/rest/record/workOrder/","accept":"application/vnd.uub.record+json"},"delete":{"requestMethod":"DELETE","rel":"delete","url":"http://diva:8080/diva/rest/record/presentation/fitnesseTestOutputPVar"}}}} OK

Reset testdata

Remove data created for this test

Delete created metadataTextVariable, presentationVars and texts


RecordEndpointFixture
authToken type id testDeleteRecord? getStatusType?
$adminAuthToken presentation fitnesseTestPVar BLANK OK
$adminAuthToken presentation fitnesseTestOutputPVar BLANK OK
$adminAuthToken metadata fitnesseTestTextVar BLANK OK
$adminAuthToken text fitnesseTestTextVarText BLANK OK
$adminAuthToken text fitnesseTestTextVarDefText BLANK OK