diff --git a/allocate-printer-resources.test b/allocate-printer-resources.test new file mode 100644 index 0000000..f50d27b --- /dev/null +++ b/allocate-printer-resources.test @@ -0,0 +1,31 @@ +# +# Script to allocate a resource to a printer object +# +# A top-level file/immediate caller will provide the values for $uri: system-uri, $resource-ids, $printer-id +# +# Usage ./ipptool -d uri={system-uri} resource-ids={value} printer-id={value} allocate-printer-resources.test + +{ + NAME "Allocate-Printer-Resources $resource-ids to Printer $printer-id" + + OPERATION Allocate-Printer-Resources + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + ATTR 1setOf integer(1:MAX) resource-ids $resource-ids + ATTR integer(1:65535) printer-id $printer-id + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + + EXPECT printer-resource-ids OF-TYPE 1setOf integer(1:MAX) IN-GROUP printer-attributes-tag DEFINE_VALUE printer-resource-ids + + DISPLAY printer-resource-ids +} diff --git a/cancel-subscription.test b/cancel-subscription.test new file mode 100644 index 0000000..5222015 --- /dev/null +++ b/cancel-subscription.test @@ -0,0 +1,29 @@ +# +# Script to delete a subscription object, this prevents referencing this object in the future + +#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned. + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $notify-subscription-id + +# Usage ./ipptool -d uri={system-uri} notify-subscription-id={value} cancel-subscription.test + +{ + NAME "Cancel the subscription object with id: $notify-subscription-id on the system: $uri" + + OPERATION Cancel-Subscription + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + ATTR integer(1:MAX) notify-subscription-id $notify-subscription-id + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + +} \ No newline at end of file diff --git a/create-job-withJobTemplate.test b/create-job-withJobTemplate.test new file mode 100644 index 0000000..9cfab7e --- /dev/null +++ b/create-job-withJobTemplate.test @@ -0,0 +1,32 @@ +# Script to create a job object using a template-job-resource + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $resources-ids + +# Usage ./ipptool -d uri={system-uri} resources-ids={values} create-job-withJobTemplate.test +# Do include a template-job-resource in the resource-ids. You can include only one such template-job-resource. Also resource-ids may consist of other static-resources. + +{ + NAME "Create a Job-Object with template-job and other resources : $resource-ids, on the system: $system-uri" + + OPERATION Create-Job + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + ATTR 1setOf integer(1:MAX) resources-ids $resources-ids + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + + EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag + EXPECT job-id OF-TYPE integer(1:MAX) IN-GROUP job-attributes-tag + EXPECT job-state OF-TYPE type1 enum IN-GROUP job-attributes-tag + EXPECT job-state-reasons OF-TYPE 1setOf type2 keywordIN-GROUP job-attributes-tag + +} \ No newline at end of file diff --git a/get-printer-attributes-all.test b/get-printer-attributes-all.test new file mode 100644 index 0000000..3433596 --- /dev/null +++ b/get-printer-attributes-all.test @@ -0,0 +1,67 @@ +# +# Script to query the default printer to enlist 'all' its attributes +# This test takes the requested attributes with value 'all' and returns its attributes in regard to the access control mechanisms + +#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned. + +# It is highly recommended that the tester provides the document-format attribute. If the union of all supports is required, you should provide the value of the attribute as 'application/octet-stream'. + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $document-format + +# Usage ./ipptool -d uri={system-uri} notify-subscription-id={value} get-printer-attributes-all.test + +{ + NAME "Get all the default printer attributes in the system: $system-uri, under access control" + + OPERATION Get-Printer-Attributes + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + ATTR 1setOf keyword requested-attributes all + ATTR mimeMediaType document-format $document-format + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + + #job-template-attributes + EXPECT job-priority OF-TYPE integer IN-GROUP job-attributes-tag + EXPECT job-hold-until OF-TYPE type3 keyword|name IN-GROUP job-attributes-tag + EXPECT job-sheets OF-TYPE type3 keyword|name IN-GROUP job-attributes-tag + EXPECT multiple-document-handling OF-TYPE type2 keyword IN-GROUP job-attributes-tag + EXPECT copies OF-TYPE integer (1:MAX) IN-GROUP job-attributes-tag + EXPECT finishings OF-TYPE 1setOf type2 enum IN-GROUP job-attributes-tag + EXPECT sides OF-TYPE type2 keyword IN-GROUP job-attributes-tag + EXPECT orientation-requested OF-TYPE type2 enum IN-GROUP job-attributes-tag + EXPECT number-up OF-TYPE integer (1:MAX) IN-GROUP job-attributes-tag + EXPECT media OF-TYPE type3 keyword|name IN-GROUP job-attributes-tag + EXPECT printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag + EXPECT print-quality OF-TYPE type2 enum IN-GROUP job-attributes-tag + + #required-printer-description-attributes + EXPECT printer-uri-supported OF-TYPE 1setOf uri IN-GROUP printer-attributes-tag + EXPECT uri-security-supported OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag + EXPECT uri-authentication-supported OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag + EXPECT printer-name OF-TYPE name IN-GROUP printer-attributes-tag + EXPECT printer-state OF-TYPE type1 enum IN-GROUP printer-attributes-tag + EXPECT printer-state-reasons OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag + EXPECT ipp-versions-supported OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag + EXPECT operations-supported OF-TYPE 1setOf type2 enum IN-GROUP printer-attributes-tag + EXPECT charset-configured OF-TYPE charset IN-GROUP printer-attributes-tag + EXPECT charset-supported OF-TYPE 1setOf charset IN-GROUP printer-attributes-tag + EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag + EXPECT generated-natural-language-supported OF-TYPE 1setOf naturalLanguage IN-GROUP printer-attributes-tag + EXPECT document-format-default OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag + EXPECT document-format-supported OF-TYPE 1setOf mimeMediaType IN-GROUP printer-attributes-tag + EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag + EXPECT queued-job-count OF-TYPE integer (0:MAX) IN-GROUP printer-attributes-tag + EXPECT pdl-override-supported OF-TYPE type2 keyword IN-GROUP printer-attributes-tag + EXPECT printer-up-time OF-TYPE integer (1:MAX) IN-GROUP printer-attributes-tag + EXPECT compression-supported OF-TYPE 1setOf type3 keyword IN-GROUP printer-attributes-tag +} \ No newline at end of file diff --git a/get-printer-attributes-job-template.test b/get-printer-attributes-job-template.test new file mode 100644 index 0000000..65c5d98 --- /dev/null +++ b/get-printer-attributes-job-template.test @@ -0,0 +1,46 @@ +# +# Script to query the default printer to enlist its job-template attributes +# This test takes the requested attributes with value 'job-template' and returns its attributes in regard to the access control mechanisms + +#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned. + +# It is highly recommended that the tester provides the document-format attribute. If the union of all supports is required, you should provide the value of the attribute as 'application/octet-stream'. + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $document-format + +# Usage ./ipptool -d uri={system-uri} notify-subscription-id={value} get-printer-attributes-job-template.test + +{ + NAME "Get the default printer job-template attributes in the system: $system-uri, under access control" + + OPERATION Get-Printer-Attributes + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + ATTR 1setOf keyword requested-attributes job-template + ATTR mimeMediaType document-format $document-format + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + + #job-template-attributes + EXPECT job-priority OF-TYPE integer IN-GROUP job-attributes-tag + EXPECT job-hold-until OF-TYPE type3 keyword|name IN-GROUP job-attributes-tag + EXPECT job-sheets OF-TYPE type3 keyword|name IN-GROUP job-attributes-tag + EXPECT multiple-document-handling OF-TYPE type2 keyword IN-GROUP job-attributes-tag + EXPECT copies OF-TYPE integer (1:MAX) IN-GROUP job-attributes-tag + EXPECT finishings OF-TYPE 1setOf type2 enum IN-GROUP job-attributes-tag + EXPECT sides OF-TYPE type2 keyword IN-GROUP job-attributes-tag + EXPECT orientation-requested OF-TYPE type2 enum IN-GROUP job-attributes-tag + EXPECT number-up OF-TYPE integer (1:MAX) IN-GROUP job-attributes-tag + EXPECT media OF-TYPE type3 keyword|name IN-GROUP job-attributes-tag + EXPECT printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag + EXPECT print-quality OF-TYPE type2 enum IN-GROUP job-attributes-tag +} \ No newline at end of file diff --git a/get-printer-attributes-printer-description.test b/get-printer-attributes-printer-description.test new file mode 100644 index 0000000..eac6243 --- /dev/null +++ b/get-printer-attributes-printer-description.test @@ -0,0 +1,53 @@ +# +# Script to query the default printer to enlist its printer-description attributes +# This test takes the requested attributes with value 'printer-description' and returns its attributes in regard to the access control mechanisms + +#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned. + +# It is highly recommended that the tester provides the document-format attribute. If the union of all supports is required, you should provide the value of the attribute as 'application/octet-stream'. + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $document-format + +# Usage ./ipptool -d uri={system-uri} notify-subscription-id={value} get-printer-attributes-printer-description.test + +{ + NAME "Get the default printer printer-description attributes in the system: $system-uri, under access control" + + OPERATION Get-Printer-Attributes + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + ATTR 1setOf keyword requested-attributes printer-description + ATTR mimeMediaType document-format $document-format + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + + #required-printer-description-attributes + EXPECT printer-uri-supported OF-TYPE 1setOf uri IN-GROUP printer-attributes-tag + EXPECT uri-security-supported OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag + EXPECT uri-authentication-supported OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag + EXPECT printer-name OF-TYPE name IN-GROUP printer-attributes-tag + EXPECT printer-state OF-TYPE type1 enum IN-GROUP printer-attributes-tag + EXPECT printer-state-reasons OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag + EXPECT ipp-versions-supported OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag + EXPECT operations-supported OF-TYPE 1setOf type2 enum IN-GROUP printer-attributes-tag + EXPECT charset-configured OF-TYPE charset IN-GROUP printer-attributes-tag + EXPECT charset-supported OF-TYPE 1setOf charset IN-GROUP printer-attributes-tag + EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag + EXPECT generated-natural-language-supported OF-TYPE 1setOf naturalLanguage IN-GROUP printer-attributes-tag + EXPECT document-format-default OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag + EXPECT document-format-supported OF-TYPE 1setOf mimeMediaType IN-GROUP printer-attributes-tag + EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag + EXPECT queued-job-count OF-TYPE integer (0:MAX) IN-GROUP printer-attributes-tag + EXPECT pdl-override-supported OF-TYPE type2 keyword IN-GROUP printer-attributes-tag + EXPECT printer-up-time OF-TYPE integer (1:MAX) IN-GROUP printer-attributes-tag + EXPECT compression-supported OF-TYPE 1setOf type3 keyword IN-GROUP printer-attributes-tag +} \ No newline at end of file diff --git a/get-printer-resources.test b/get-printer-resources.test new file mode 100644 index 0000000..931e57e --- /dev/null +++ b/get-printer-resources.test @@ -0,0 +1,50 @@ +# +# Script to find resources of a printer on the system. +# This test takes the following attributes for input: +# printer-uri +# resource-ids +# first-index +# limit +# requested-attributes +# resource-formats +# resource-states +# resource-types + +#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned. + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $resource-ids, $first-index, $limit, $requested-attributes, $resource-formats, $resource-states, $resource-types + + +# Usage ./ipptool -d uri={system-uri} resource-ids={value} first-index={value} limit={value} requested-attributes={value} resource-formats={value} resource-states={value} resource-types={value} get-printer-resources.test + +{ + NAME "Search for Resources of a Printer" + + OPERATION Get-Printer-Resources + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri printer-uri $uri + ATTR 1setOf (integer(1:MAX)) resource-ids $resource-ids + ATTR integer(1:MAX) first-index $first-index + ATTR integer(1:MAX) limit $limit + ATTR 1setOf (type2 keyword) requested-attributes $requested-attributes + ATTR 1setOf (mimeMediaType) resource-formats $resource-formats + ATTR 1setOf (type1 enum) resource-states $resource-states + ATTR 1setOf (type2 keyword) resource-types $resource-types + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + + EXPECT resource-id OF_TYPE (integer(1:MAX)) IN-GROUP resource-attributes-tag + EXPECT resource-uuid OF-TYPE uri(45) IN-GROUP resource-attributes-tag + EXPECT resource-state OF-TYPE (type1 enum) IN-GROUP resource-attributes-tag + EXPECT resource-state-reasons OF-TYPE (1setOf type2 keyword) IN-GROUP resource-attributes-tag + +} diff --git a/get-printers.test b/get-printers.test new file mode 100644 index 0000000..7596265 --- /dev/null +++ b/get-printers.test @@ -0,0 +1,55 @@ +# +# Script to find resources of a printer on the system. +# This test takes the following attributes for input: +# printer-ids +# first-index +# limit +# printer-geo-location +# printer-location +# printer-service-type +# requested-attributes +# document-format +# which-printers + +#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned. + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $printer-ids, $first-index, $limit, +$printer-geo-location, $printer-location, $printer-service-type, $requested-attributes, $document-format, $which-printers, + +# Usage ./ipptool -d uri={system-uri} printer-ids={value} first-index={value} limit={value} printer-geo-location={value} printer-location={value} printer-service-type={value} requested-attributes={value} document-format={value} which-printers={value} get-printers.test + +{ + NAME "Search for Printers" + + OPERATION Get-Printers + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + ATTR 1setOf (integer(1:65535)) printer-ids $printer-ids + ATTR integer(1:MAX) first-index $first-index + ATTR integer(1:MAX) limit $limit + ATTR uri printer-geo-location $printer-geo-location + ATTR text(127) printer-location $printer-location + ATTR 1setOf type2 keyword printer-service-type $printer-service-type + ATTR 1setOf type2 keyword requested-attributes $requested-attributes + ATTR mimeMediaType document-format $document-format + ATTR type2 keyword which-printers $which-printers + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + + EXPECT printer-id OF_TYPE (integer(1:65535)) IN-GROUP printer-attributes-tag + EXPECT printer-uuid OF-TYPE uri(45) IN-GROUP printer-attributes-tag + EXPECT printer-xri-supported OF-TYPE (1setOf collection) IN-GROUP printer-attributes-tag + EXPECT printer-state OF-TYPE (type1 enum) IN-GROUP printer-attributes-tag + EXPECT printer-state-reasons OF-TYPE (1setOf type2 keyword) IN-GROUP printer-attributes-tag + EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag + +} diff --git a/print-job-withJobTemplate.test b/print-job-withJobTemplate.test new file mode 100644 index 0000000..cf5e6ac --- /dev/null +++ b/print-job-withJobTemplate.test @@ -0,0 +1,37 @@ +# Script to print a job object using a template-job-resource + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $resources-ids, $job-name, $document-format, $filename + +# Usage ./ipptool -d uri={system-uri} resources-ids={values} job-name={value} document-format={value} filename={value} print-job-withJobTemplate.test +# Do include a template-job-resource in the resource-ids. You can include only one such template-job-resource. Also resource-ids may consist of other static-resources. + +{ + NAME "Print a Job-Object with template-job and other resources : $resource-ids, on the system: $system-uri" + + OPERATION Print-Job + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + ATTR 1setOf integer(1:MAX) resources-ids $resources-ids + ATTR name(MAX) job-name $job-name + ATTR mimeMediaType document-format $document-format + + GROUP document-attributes-group + FILE $filename + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + + EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag + EXPECT job-id OF-TYPE integer(1:MAX) IN-GROUP job-attributes-tag + EXPECT job-state OF-TYPE type1 enum IN-GROUP job-attributes-tag + EXPECT job-state-reasons OF-TYPE 1setOf type2 keywordIN-GROUP job-attributes-tag + +} \ No newline at end of file diff --git a/print-uri-withJobTemplate.test b/print-uri-withJobTemplate.test new file mode 100644 index 0000000..9a3f3fa --- /dev/null +++ b/print-uri-withJobTemplate.test @@ -0,0 +1,34 @@ +# Script to print a uri using a template-job-resource +# Make sure that the Printer supports the retrieval method (e.g., http, ftp, etc.) implied by your URI +# A top-level file/immediate caller will provide the values for $uri: system-uri, $resources-ids, $document-uri + +# Usage ./ipptool -d uri={system-uri} resources-ids={values} document-uri={value} print-uri-withJobTemplate.test + +# Do include a template-job-resource in the resource-ids. You can include only one such template-job-resource. Also resource-ids may consist of other static-resources. + +{ + NAME "Print document on a URI with template-job and other resources : $resource-ids, on the system: $system-uri" + + OPERATION Print-Job + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + ATTR 1setOf integer(1:MAX) resources-ids $resources-ids + ATTR uri document-uri $document-uri + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + + EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag + EXPECT job-id OF-TYPE integer(1:MAX) IN-GROUP job-attributes-tag + EXPECT job-state OF-TYPE type1 enum IN-GROUP job-attributes-tag + EXPECT job-state-reasons OF-TYPE 1setOf type2 keywordIN-GROUP job-attributes-tag + +} \ No newline at end of file diff --git a/register-output-device.test b/register-output-device.test new file mode 100644 index 0000000..b56defd --- /dev/null +++ b/register-output-device.test @@ -0,0 +1,36 @@ +# ! ONLY if the feature is supported +# +# Script register an output device for a target system object +# NOTE: Systems that conform to the IPP Shared Infrastructure Extensions [PWG5100.18] MUST support this operation + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $output-device-uuid, $printer-service-type, + +# Usage ./ipptool -d uri={system-uri} output-device-uuid={value} printer-service-type={value} register-output-device.test + +{ + NAME "Register an output device:$output-device-uuid on the system: $system-uri" + + OPERATION Register-Output-Device + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + ATTR uri(45) output-device-uuid $output-device-uuid + ATTR type2 keyword printer-service-type $printer-service-type + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + + EXPECT printer-id OF-TYPE integer(1:65535) IN-GROUP printer-attributes-tag + EXPECT printer-uuid OF-TYPE uri(45) IN-GROUP printer-attributes-tag + EXPECT printer-xri-supported OF-TYPE 1setOf collection IN-GROUP printer-attributes-tag + EXPECT printer-state OF-TYPE type1 enum IN-GROUP printer-attributes-tag + EXPECT printer-state-reasons OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag + EXPECT printer-is-accepting-job OF-TYPE boolean IN-GROUP printer-attributes-tag +} \ No newline at end of file diff --git a/renew-subscription.test b/renew-subscription.test new file mode 100644 index 0000000..32f0e53 --- /dev/null +++ b/renew-subscription.test @@ -0,0 +1,34 @@ +# +# Script to renew the lease of a subscription object with a finite time-lease + +#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned. + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $notify-subscription-id, $notify-lease-duration + +# Usage ./ipptool -d uri={system-uri} notify-subscription-id={value} notify-lease-duration={value} renew-subscription.test + +{ + NAME "Renew the lease of a subscription object: $notify-subscription-id in the system: $system-uri, by $notify-lease-duration seconds" + + OPERATION Renew-Subscription + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + ATTR integer(1:MAX) notify-subscription-id $notify-subscription-id + + GROUP subscription-attributes-tag + ATTR integer(0:MAX) notify-lease-duration $notify-lease-duration + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + + EXPECT notify-lease-duration OF-TYPE integer(0:MAX) IN-GROUP subscription-attributes-tag + +} \ No newline at end of file diff --git a/set-resource-attributes.test b/set-resource-attributes.test new file mode 100644 index 0000000..da17fb6 --- /dev/null +++ b/set-resource-attributes.test @@ -0,0 +1,38 @@ +# Script to set the values of a resource-description attributes. The following attributes will be set: +# resource-info (text(MAX)) +# resource-name (name(MAX)) + +# This test assumes the presence of these attributes in the "resource-settable-attributes-supported" attribute + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $resource-id, $resource-info, $resource-name + +# Usage ./ipptool -d uri={system-uri} resource-id={value} resource-info={value} resource-name={value} set-resource-attributes.test + +{ + NAME "Set the resource description attributes of the resource $resource-id in the system: $system-uri" + + OPERATION Set-Resource-Attributes + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + + GROUP resource-attributes tag + + ATTR text(MAX) resource-info $resource-info + ATTR name(MAX)resource-name $resource-name + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag + + EXPECT resource-id OF-TYPE integer(1:MAX) IN-GROUP resource-attributes-tag + EXPECT resource-uuid OF-TYPE uri(45) IN-GROUP resource-attributes-tag + EXPECT resource-state OF-TYPE type1 enum IN-GROUP resource-attributes-tag + EXPECT resource-state-reasons OF-TYPE 1setOf type2 keyword IN-GROUP resource-attributes-tag +} \ No newline at end of file diff --git a/set-system-attributes-default-configured.test b/set-system-attributes-default-configured.test new file mode 100644 index 0000000..4575e03 --- /dev/null +++ b/set-system-attributes-default-configured.test @@ -0,0 +1,40 @@ +# +# Script to set the values of a subset of system-description attributes. The following attributes will be set: +# system-default-printer-id (integer(1:65535) | no-value) +# ippget-event-life (integer(15:MAX)) +# charset-configured (charset) +# natural-language-configured (naturalLanguage) + +## More attributes may be added! + +# This test assumes the presence of these attributes in the "system-settable-attributes-supported" attribute + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $system-default-printer-id, $ippget-event-life, $charset-configured, $natural-language-configured + +# Usage ./ipptool -d uri={system-uri} system-default-printer-id={value} ippget-event-life={value} charset-configured={value} natural-language-configured={value} set-system-attributes-default-configured.test + +{ + NAME "Set some of the defaults and configured description attributes of the system: $system-uri" + + OPERATION Set-System-Attributes + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + + GROUP system-attributes tag + + ATTR integer(1:65535)|no-value system-default-printer-id $system-default-printer-id + ATTR integer(15:MAX) ippget-event-life $ippget-event-life + ATTR charset charset-configured $charset-configured + ATTR naturalLanguage natural-language-configured $natural-language-configured + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag +} \ No newline at end of file diff --git a/set-system-attributes-general.test b/set-system-attributes-general.test new file mode 100644 index 0000000..e188d6b --- /dev/null +++ b/set-system-attributes-general.test @@ -0,0 +1,44 @@ +# +# Script to set the values of a subset of system-description attributes. The following attributes will be set: +# system-current-time (dateTime) +# system-geo-location (uri | unknown) +# system-info (text(127)) +# system-location (text(127)) +# system-make-and-model (text(127)) +# system-message-from-operator (text(127)) +# system-name (name(127)) + +# This test assumes the presence of these attributes in the "system-settable-attributes-supported" attribute + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $system-current-time ,$system-geo-location ,$system-info ,$system-location ,$system-make-and-model, $system-message-from-operator + +# Usage ./ipptool -d uri={system-uri} system-current-time={value} system-geo-location={value} system-info={value} system-location={value} system-make-and-model={value} system-message-from-operator={value} set-system-attributes-general.test + +{ + NAME "Set the generic description attributes of the system: $system-uri" + + OPERATION Set-System-Attributes + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + + GROUP system-attributes tag + + ATTR dateTime system-current-time $system-current-time + ATTR uri|unknown system-geo-location $system-geo-location + ATTR text(127) system-info $system-info + ATTR text(127) system-location $system-location + ATTR text(127) system-make-and-model $system-make-and-model + ATTR text(127) system-message-from-operator $system-message-from-operator + ATTR name(127)system-name $system-name + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag +} \ No newline at end of file diff --git a/set-system-attributes-power-calendar.test b/set-system-attributes-power-calendar.test new file mode 100644 index 0000000..b86b81b --- /dev/null +++ b/set-system-attributes-power-calendar.test @@ -0,0 +1,50 @@ +# +# Script to set the values of a subset of system-description attributes. The following attributes will be set: +# power-calendar-policy-col (1setOf collection) +# calendar-id (integer(1:MAX)) +# request-power-state (type1 enum) +# run-once (boolean) +# day-of-month (integer(1:31)) +# day-of-week (integer(1:7)) +# hour (integer(0:23)) +# minute (integer(0:59)) +# month (integer(1:12)) + +# This test assumes the presence of these attributes in the "system-settable-attributes-supported" attribute + +#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned. + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $power-calendar-policy-col, $calendar-id, $request-power-state, $run-once, $day-of-month, $day-of-week, $hour, $minute, $month + +# Usage ./ipptool -d uri={system-uri} power-calendar-policy-col={value} calendar-id={value} request-power-state,={value} run-once={value} day-of-month={value} day-of-week={value} hour={value} minute={value} month={value} set-system-attributes-power-calendar.test + +{ + NAME "Set the power-calendar group attributes of the system: $system-uri" + + OPERATION Set-System-Attributes + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + + GROUP system-attributes tag + + ATTR 1setOf collection power-calendar-policy-col $power-calendar-policy-col + ATTR integer(1:MAX) calendar-id$calendar-id + ATTR type1 enum request-power-state $request-power-state + ATTR boolean run-once $run-once + ATTR integer(1:31) day-of-month $day-of-month + ATTR integer(1:7) day-of-week $day-of-week + ATTR integer(0:23) hour $hour + ATTR minute (integer(0:59) minute $minute + ATTR month (integer(1:12) month $month + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag +} \ No newline at end of file diff --git a/set-system-attributes-power-event.test b/set-system-attributes-power-event.test new file mode 100644 index 0000000..d65b01d --- /dev/null +++ b/set-system-attributes-power-event.test @@ -0,0 +1,38 @@ +# +# Script to set the values of a subset of system-description attributes. The following attributes will be set: +# power-event-policy-col (1setOf collection) +# event-id (integer(1:MAX)) +# event-name (name(127)) +# request-power-state (type1 enum) + +# This test assumes the presence of these attributes in the "system-settable-attributes-supported" attribute + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $power-event-policy-col, $event-id , $event-name , $request-power-state + +# Usage ./ipptool -d uri={system-uri} power-event-policy-col={value} event-id={value} event-name={value} request-power-state={value} set-system-attributes-power-event.test + +{ + NAME "Set the power-event group attributes of the system: $system-uri" + + OPERATION Set-System-Attributes + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + + GROUP system-attributes tag + + ATTR 1setOf collection power-event-policy-col $power-event-policy-col + ATTR integer(1:MAX) event-id $event-id + ATTR name(127) event-name $event-name + ATTR type1 enum request-power-state $request-power-state + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag +} \ No newline at end of file diff --git a/set-system-attributes-power-timeout.test b/set-system-attributes-power-timeout.test new file mode 100644 index 0000000..6472860 --- /dev/null +++ b/set-system-attributes-power-timeout.test @@ -0,0 +1,42 @@ +# +# Script to set the values of a subset of system-description attributes. The following attributes will be set: +# power-timeout-policy-col (1setOf collection) +# request-power-state (type1 enum) +# start-power-state (type1 enum) +# timeout-id (integer(1:MAX)) +# timeout-predicate (type2 keyword) +# timeout-seconds (integer(0:MAX)) + +# This test assumes the presence of these attributes in the "system-settable-attributes-supported" attribute + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $power-timeout-policy-col, $request-power-state, $start-power-state, $timeout-id, $timeout-predicate, $timeout-seconds + +# Usage ./ipptool -d uri={system-uri} power-timeout-policy-col={value} request-power-state={value} start-power-state={value} timeout-id={value} timeout-predicate={value} timeout-seconds={value} set-system-attributes-power-timeout.test + +{ + NAME "Set the power-timeout group attributes of the system: $system-uri" + + OPERATION Set-System-Attributes + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + + GROUP system-attributes tag + + ATTR 1setOf collection power-timeout-policy-col $power-timeout-policy-col + ATTR type1 enum request-power-state $request-power-state + ATTR type1 enum start-power-state $start-power-state + ATTR integer(1:MAX) timeout-id $timeout-id + ATTR type2 keyword timeout-predicate $timeout-predicate + ATTR integer(0:MAX) timeout-seconds $timeout-seconds + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag +} \ No newline at end of file diff --git a/set-system-attributes-system-contact.test b/set-system-attributes-system-contact.test new file mode 100644 index 0000000..c0e73c5 --- /dev/null +++ b/set-system-attributes-system-contact.test @@ -0,0 +1,38 @@ +# +# Script to set the values of a subset of system-description attributes. The following attributes will be set: +# system-contact-col (collection | unknown) +# contact-name (name(MAX)) +# contact-uri (uri) +# contact-vcard (1setOf text(MAX)) + +# This test assumes the presence of these attributes in the "system-settable-attributes-supported" attribute + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $system-contact-col, $contact-name, $contact-uri , $contact-vcard + +# Usage ./ipptool -d uri={system-uri} system-contact-col={value} contact-name={value} contact-uri={value} contact-vcard={value} set-system-attributes-system-contact.test + +{ + NAME "Set the system-contact group attributes of the system: $system-uri" + + OPERATION Set-System-Attributes + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + + GROUP system-attributes tag + + ATTR collection|unknown system-contact-col $system-contact-col + ATTR name(MAX) contact-name $contact-name + ATTR uri contact-uri $contact-uri + ATTR 1setOf text(MAX) contact-vcard $contact-vcard + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag +} \ No newline at end of file diff --git a/set-system-attributes-xri-uri.test b/set-system-attributes-xri-uri.test new file mode 100644 index 0000000..cd742a5 --- /dev/null +++ b/set-system-attributes-xri-uri.test @@ -0,0 +1,36 @@ +# +# Script to set the values of a subset of system-description attributes. The following attributes will be set: +# xri-uri (uri) +# xri-authentication (type2 keyword) +# xri-security (type2 keyword) + +# This test assumes the presence of these attributes in the "system-settable-attributes-supported" attribute + +# A top-level file/immediate caller will provide the values for $uri: system-uri, $xri-uri, $xri-authentication, $xri-security + +# Usage ./ipptool -d uri={system-uri} xri-uri={value} xri-authentication={value} xri-security={value} set-system-attributes-xri-uri.test + +{ + NAME "Set the xri-uri group description attributes of the system: $system-uri" + + OPERATION Set-System-Attributes + VERSION 2.0 + + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR naturalLanguage attributes-natural-language en + ATTR uri system-uri $uri + + GROUP system-attributes tag + + ATTR uri xri-uri $xri-uri + ATTR type2 keyword xri-authentication $xri-authentication + ATTR type2 keyword xri-security $xri-security + + STATUS successful-ok + + EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag + EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag + ?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag + ?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag +} \ No newline at end of file