Jump to: navigation, search

Difference between revisions of "MagnetoDB/QA/Test cases"

(BatchWriteItem)
Line 8: Line 8:
 
#* Complete set of CORRECT options
 
#* Complete set of CORRECT options
 
# PutRequest:
 
# PutRequest:
#* Specify:<br />
+
#* Specify: \
CORRECT Item string and<br />
+
CORRECT Item string and \
 
"N" : "string" value
 
"N" : "string" value
 
#* Specify: NON-EXISTENT Item string + "N" : "string" value
 
#* Specify: NON-EXISTENT Item string + "N" : "string" value

Revision as of 12:47, 26 March 2014


BatchGetItem

BatchWriteItem

  1. General:
    • Complete set of CORRECT options
  2. PutRequest:
    • Specify: \

CORRECT Item string and \ "N" : "string" value

    • Specify: NON-EXISTENT Item string + "N" : "string" value

=> Error + UnprocessedItems contains unprocessed PutRequest Items

    • Specify:

EMPTY Item string and

"N" : "string" value

=> Error + UnprocessedItems contains unprocessed PutRequest Items

    • Specify:

CORRECT Item string and

"NS" : ["string"] values

    • Specify:

CORRECT Item string and

"B" : "string" value

    • Specify:

CORRECT Item string and

"BS" : ["string"] values

    • Specify:

CORRECT Item string and

"S" : "string" value

    • Specify:

CORRECT Item string and

"SS" : ["string"] values

    • Specify:

CORRECT Item string and

"N" : EMPTY value

=> ValidationException + UnprocessedItems contains unprocessed PutRequest Items

    • Specify:

CORRECT Item string and

"<SOME_STRANGE_OR_EMPTY_VALUE>" : "string" value

=> ValidationException + UnprocessedItems contains unprocessed PutRequest Items

    • Specify:

CORRECT Item string and

"NS" : "NON-EXISTENT_string" value

=> ValidationException + UnprocessedItems contains unprocessed PutRequest Items

  1. DeleteRequest:
    • Specify:

CORRECT Key string and

"N" : "string" value

    • Specify:

NON-EXISTENT Key string and

"N" : "string" value

=> Error + UnprocessedItems contains unprocessed DeleteRequest Items

    • Specify:

EMPTY Key string and

"N" : "string" value

=> Error + UnprocessedItems contains unprocessed DeleteRequest Items

    • Specify:

CORRECT Key string and

"NS" : ["string"] values

    • Specify:

CORRECT Key string and

"B" : "string" value

    • Specify:

CORRECT Key string and

"BS" : ["string"] values

    • Specify:

CORRECT Key string and

"S" : "string" value

    • Specify:

CORRECT Key string and

"SS" : ["string"] values

  1. CombinedRequest:
    • Specify in one statement:

CORRECT Key string for

DeleteRequest "N" : "string" value AND

CORRECT Item string for

PutRequest "N" : "string" value

    • Specify in one statement:

CORRECT Key string for

DeleteRequest "B" : "string" value AND

CORRECT Key string for

DeleteRequest "SS" : "string" values AND

CORRECT Item string for

PutRequest "NS" : "string" values AND

(!!!) INCORRECT Item string for

PutRequest "S" : "string" value

    • Specify in one statement:

CORRECT Item string for

PutRequest "N" : "string_A" value

CORRECT Key string for

DeleteRequest "N" : "string_A" value

=> An error: you can't put and delete the same item in the same BatchWriteItem request

  1. RequestItems (TableName):
    • Specify:

CORRECT table name and

CORRECT PutRequest parameters for the Item

=> Line(s) added correctly

    • Specify 25 CORRECT table names and

CORRECT PutRequest parameters for the Items

=> Line(s) added correctly into all 25 tables

    • Specify 26 CORRECT table names and

CORRECT PutRequest parameters for the Items

=> error/exception (?)

    • Specify:

CORRECT table name and

CORRECT DeleteRequest parameters for the Key

=> Line(s) deleted correctly

    • Specify:

INCORRECT table name

CORRECT PutRequest parameters for an Item

Check:

UnprocessedItems contains unprocessed PutRequest Items

   TableName < 3 symbols => Exception
   TableName > 255 symbols => Exception
   Non-existent table name => Exception
    • Specify:

CORRECT table name and

CORRECT PutRequest parameters for the Item

Make total request size more than 1 MB (how to?)

=> Error

    • Specify:

CORRECT table name and

CORRECT PutRequest parameters for the Item

Any individual item in a batch exceeds 64 KB (how to?)

=> Error

  1. ReturnItemCollectionMetrics:
    • is NONE (by default)

=> no statistics are returned

    • is SIZE

=> statistics about item collections, if any, that were modified during the operation are returned in the response

    • is Something_else

=> error

  1. ReturnConsumedCapacity:
    • is NONE (by default)

=> ConsumedCapacity is not included in the response.

    • is TOTAL

=> the response includes ConsumedCapacity data for tables and indexes

    • is INDEXES

=> the response includes ConsumedCapacity for indexes only

    • is Something_else (and empty)

=> error/exception

  1. Exceptions:
    • Simulate InternalServerError
    • Simulate ItemCollectionSizeLimitExceededException
    • Simulate ProvisionedThroughputExceededException
    • Simulate ResourceNotFoundException

CreateTable

  1. N: Try to create two tables with the same name in the same region -> ResourceInUseException expected.
  2. N: Try to create two tables with the same name in two different regions.
  3. P: Verify first status is CREATING, then ACTIVE.
  4. What happens if read/write to/from table in CREATING state? Possible to reproduce?
  5. Create one table with sec. indexes and then try to create one more table while the first one is in CREATING state. Possible to reproduce? How much time the table should be in CREATING state? Can I manage this time anyhow?
  6. N: Try to create table w/o some mandatory attribute: AttributeDefinitions, KeySchema, ProvisionedThroughput, TableName.
  7. DONE. P: Create table without any optional attributes, only all mandatory.
  8. AttributeDefinitions
    • Number of attrs:
      • P: create table with 1 attr
      • What is upper limit? Try max and max+1

"Individual items in an DynamoDB table can have any number of attributes, although there is a limit of 64 KB on the item size. An item size is the sum of lengths of its attribute names and values (binary and UTF-8 lengths)."

So, number of attr is limited only by item size. Can be tested only via PutItem?

  • Create a table with key and non-key (and non-index also) attributes. It should fail. Non-key attrs are unacceptable.
    • Test for PutItem: Put item not containing values for non-key/non-indexed attributes of the table to ensure these attrs are not required.
    • Attr name:
      • P: Try length of 1 symbol, 255 (upper limit) - these limits are applicable only for key attrs and index projections. Other attrs can have longer names, without explicit limits (just size of the whole item).
      • N: Try lengh 255+1 for key and indexes attr.
      • P: Check size of non-key / non-index-projected attr names.
    • N: Try to send attr names without attr types.
    • P: Create table with attrs of each type: S, N, B. Ensure the data types are applied on put/get operations (it could be covered in Put/Get tests).
    • AWS says regarding local indexes creation: “You can project attributes of any data type, including scalar data types and multi-valued sets.” But how to define projection of Set types if they cannot be assigned to the attributes on table creation stage?
    • N: Try to create a table with attribute of some SET type. It should not be allowed.
  1. KeySchema
    • P: Create table with a key of HASH type.
    • P: Create table with a key of HASH and RANGE type.
    • N?: Try to enumerate key attrs in wrong order: RANGE and then HASH attrs in the KeySchema list.
    • N: Try to create a table only with RANGE key.
    • N: Try to leave the list empty.
    • N: Try to add more than one HASH and/or RANGE attr. In general, add more than 2 attrs to the list.
    • N: Try keytype different from HASH and RANGE.
    • N: Try not to mention key attr in Definitions but only in KeySchema.
    • N: Try to mention attr names not defined in AttrDefinitions.
  2. ProvisionedThroughput

Note: for now, MagnetoDB ignores these values.

  • P: Set positive values.
  • N: Try to mention not all mandatory attrs.
  • N: Try to pass non-number, negative number.
  1. TableName
    • P: Length Min: 3, Max: 255. Try limits
    • N: and out of limits.
    • TO BE CLARIFIED: What are the limitations regarding lower and upper case, hyphen and other symbols? Do they correspond to DynamoDB rules?
      • AWS says: “For table and secondary index names, allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot). Names can be between 3 and 255 characters long.”
    • N: Try empty table name.
  2. LocalSecondaryIndexes
    • Try to create index without some of mandatory attributes.
    • Number of indexes
      • Try min=1, max=5.
      • Try max+1
      • Try to set LSI attribute as an empty list.
    • “There is a 10 GB size limit per hash key” - how to evaluate it? Generate so many items that size of all hash key value is about 10 GB?
    • IndexName:
      • Min: 3, Max: 255. Try limits and out of limits; empty line.
      • TO BE CLARIFIED: Is it case-sensitive? non-letters?
      • Create 2 tables with similar index names. Should be fine.
      • Try to create 2 indexes with the same name in one table. Should be error.
    • KeySchema
      • Try to create LSI with Hash different from table hash key (table should have H+R key).
      • Try to create LSI for table with HASH w/o RANGE. Should fail. But will work for global indexes.
      • Create similar indexes with different names (the same keys, etc)
      • Try to create an index just with HASH key, w/o RANGE.
      • Try to ‘repeat’ key schema of the table. “For a local secondary index, the hash key must be the same as the table's hash key, and the range key must be a non-key table attribute.”
      • Test for PutItem: Ensure range key of LSI is not a mandatory attribute.
    • Projection
      • P: Check usage of all projection types: KEYS_ONLY, INCLUDE, ALL. Query tests will verify that it works as expected.
      • N: Try to mention NonKeyAttributes but skip ProjectionType.
      • P: Try NonKeyAttributes list with one attribute in it.
      • N: Try to mention key attrs in the NonKeyAttributes list.
      • N: Try empty NonKeyAttributes list.
      • N: Try to mention some non-key attrs in NonKeyAttributes list when Pr.Type is KEYS_ONLY. Similar with ALL case.
      • P: Create a table with 20 non-key attrs in one LSI.
      • N: Try to create a table with 21 non-key attrs in one LSI.
      • P: Create a table with 20 non-key attrs in multiple LSIs.
      • N: Try to create a table with 21 non-key attrs in diff. LSIs, without repetitions of attr names.
      • N: Try to create a table with 21 non-key attrs in diff. LSIs, with repetitions of attr names between LSI’s.
  3. GlobalSecondaryIndexes - Out of Scope for now
  4. Response
    • Most of key-values in Table Description should be equal to data from request. Verify:
      • AttributeDefinitions
      • KeySchema
      • LocalSecondaryIndexes (also new attrs appear: IndexSizeBytes, IndexStatus, ItemCount)
      • ProvisionedThroughput (also new attrs appear: LastDecreaseDateTime, LastIncreaseDateTime - these two should be absent on creation, NumberOfDecreasesToday - should be 0 on creation)
      • TableName
    • Attrs not present in request but should be present response:
      • CreationDateTime
      • ItemCount (should be 0 just after table creation)
      • TableSizeBytes (should be 0 on creation)
      • TableStatus (should be CREATING, then ACTIVE)
    • If LSI are not created, should this attr be present in response as empty list?
    • Think how to check TableSizeBytes value.
    • TBD: CreationDateTime verification: Find a way to get current time from the target system.
  5. Exceptions
    • LimitExceededException
      • relates to in-progress states. Not possible to reproduce for now.
      • Table number limit should be defined. After that - verify it.
    • ResourceInUseException
      • recreate existing table (the case was mentioned above)
    • InternalServerError
      • When this error [500] is expected and when some other error should appear?
  6. Additional: Create more than 255 tables

DeleteItem

DeleteTable

  1. (P) Delete an existing table. Check if all the Response’s fields (see Table Description object) are equal to the appropriate table parameters
  2. (N) Delete a non-existent table (ResourceNotFoundException)
  3. (N) Delete a table specifying “” as a name
  4. (N) Delete a table specifying NULL as a name
  5. (N) Delete a table w/o specifying any parameters
  6. (N) Delete a table having a name that contains only 2 or 1 symbol
  7. (N) Delete a table having a name that contains more than 255 symbols
  8. (P) Delete an existing table and, while the status is DELETING, run DeleteTable operation for the same table once again
  9. (N) Simulate InternalServerError exception. Ideas?
  10. (P) Simulate LimitExceededException exception. Ideas?

Delete more than 10 tables in the same time

  1. (P) Simulate ResourceInUseException exception. Ideas?

Delete a table while it is in use by some other operation

  1. (N) Simulate ResourceNotFoundException exception. Other ideas?

DescribeTable

  1. (P) Run DescribeTable against the existing table. Check that all the required params are described correctly (see “Response Syntax” for DescribeTable statement)
  2. (N) Run DescribeTable against the non-existent table (ResourceNotFoundException exception)
  3. (N) Run DescribeTable specifying “” as a table name
  4. (N) Run DescribeTable specifying NULL as a name
  5. (N) Run DescribeTable w/o specifying any parameters
  6. (N) Run DescribeTable specifying a name that contains only 2 or 1 symbol (causes an exception?)
  7. (N) Run DescribeTable specifying a name that contains more than 255 symbols
  8. (N) Simulate InternalServerError exception

GetItem

  1. General:
  2. TableName:
    • Valid (existing) table name
    • Existing table name of 3 symbols
    • Existing table name of 255 symbols
    • Invalid:
      1. Non-existent name
      2. Empty name (“”)
      3. Less than 3 symbols long
      4. More than 255 symbols long
  3. AttributesToGet:
    • Specified, correct items in the list => ok
    • Section not specified => ok
    • “AttributesToGet” term not specified, but there is a list of items in the section => error/exception
    • Section AttributesToGet is specified, but there is just an empty list (no items) => error/exception
    • Specified more attributes than exist in the table => error/exception
    • Specified incorrect attributes:
      1. Wrong names => error/exception
      2. Empty values like "" => error/exception
  4. Key:
    • (P) One Key specified:
      1. "B" type
      2. "N" type
      3. "S" type
      4. "BS" type
      5. "NS" type
      6. "SS" type
      7. Combination of "B", "N", "S" types
      8. Combination of "B", "N", "S", "BS", "NS", "SS" types
      9. Combination of “B”, “B”, "N", "N", “S”, “S”, “BS”, “BS”, "NS", "NS", “SS”, “SS” types
    • (P) The whole section “Key” not specified => error/exception
    • (N) Section “Key” specified, but the section content is empty => error/exception
    • (N) One INCORRECT key specified: something that is not in ("B", "N", "S", "BS", "NS", "SS")
    • (P) In section “Key” there is a key of type “N” but a non-existent value specified for it => no items returned in response
  5. ConsistentRead:
    • (P) True
    • (P) False
    • (P) Not specified
    • (N) “Something else”
  6. ReturnConsumedCapacity:
    • (P) "INDEXES"
    • (P) "TOTAL"
    • (P) "NONE"
    • (N) “Something else”
  7. Exceptions:
    • (N) Simulate ConditionalCheckFailedException
    • (N) Simulate InternalServerError
    • (N) Simulate ItemCollectionSizeLimitExceededException
    • (N) Simulate ProvisionedThroughputExceededException
    • (N) Simulate ResourceNotFoundException


ListTables

  1. General:
    1. Neither Limit nor ExclusiveStartTableName specified =>
      1. (P) Empty result (if there are no tables in this Tenant and Datacenter were created)
      2. (P) A list of existing tables in this Tenant and Datacenter (if there are some in this Tenant and Datacenter tables)
      3. (P) The List does not contain the tables having “CREATING” status
    2. (N) Incorrect spelling of ListTables specified like: LisTables or Listables or ListTable, etc
    3. (N) There is no “{” or “}” in the statement
  2. Limit:
    1. (P) The limit option is not specified and

The number of existing tables is 5

=> 1 page containing all 5 tables

    1. (P) The limit option is not specified and

The number of tables is 100

=> 1 page containing all 100 tables

    1. (P) Limit = 3 and

number of existing tables is 100

=> The number of tables on the page is 3 and

"LastEvaluatedTableName" parameter in Response contains the 3rd (last displayed on the 1st page) table name and

There are 34 result pages in total

    1. (P) Limit = 3 and

"LastEvaluatedTableName" = <3d_table_name> and

number of existing tables is 100

=> The number of tables on the second page is 3 and

"LastEvaluatedTableName" parameter in Response contains the 3d (last on the second page) table name and

There are 32 yet other pages able to be displayed

    1. (N) Limit = 0

=> Error/exception

    1. (N) Limit = -2

=> Error/exception

    1. (N) Limit = "Some_strange_string"

=> Error/exception

    1. (N) Limit = ""

=> Error/exception

    1. (N) Limit = <nothing>

=> Error/exception

  1. ExclusiveStartTableName:
    1. (P) The "ExclusiveStartTableName" option not specified
    2. (P) An existing "ExclusiveStartTableName" specified
    3. (P) An existing "ExclusiveStartTableName" specified when:
      1. (P) There were no previous runs of ListTables statement
      2. (P) Previous run of ListTables statement returned just one page
    4. (P) "ExclusiveStartTableName" is 3 symbols long
    5. (P) Table name is 255 symbols long
    6. (N) Table name is 1 or 2 symbols long
    7. (N) Table name is 256 or more symbols long
    8. (N) A NON-EXISTENT table name specified
    9. (N) No table names specified
    10. (N) An empty (like "ExclusiveStartTableName" :) table name specified
  2. Tenant (account):
    1. Switch to another tenant and

Perform ListTables operations:

      1. (P) The "ExclusiveStartTableName" option not specified

=> A unique (pertinent to this specific Tenant) list of tables returned

      1. (P) An existing table name specified in "ExclusiveStartTableName"

=> A unique (pertinent to this specific Tenant) list of tables returned starting from the specified table name

  1. DataCenter (endpoint):
    1. Switch to another Datacenter and

Perform ListTables operations:

      1. (P) The "ExclusiveStartTableName" option not specified

=> A unique (pertinent to this specific Datacenter) list of tables returned

      1. (P) An existing table name specified in "ExclusiveStartTableName"

=> A unique (pertinent to this specific Datacenter) list of tables returned starting from the specified table name

PutItem

Note: For each test, check the ResponseValue for required options and values

  1. (P) Correct required fields only:
    1. put item to INSERT 1 line (an existing table, 1 correct item “S”)
    2. put item to INSERT N lines (an existing table, 1 correct item “S”)
    3. put item to UPDATE 1 line (an existing table, 1 correct item “S”), Exists = true
    4. put item to UPDATE N lines (an existing table, 1 correct item “S”), Exists = true
    5. put item to UPDATE N lines (an existing table, N correct items “S”), no “Exists” options specified (should be True by default)
  2. (P) Put item to UPDATE N lines:
    1. an existing table, N correct items of type “B”
    2. an existing table, N correct items of type “BS”
    3. an existing table, N correct items of type “N”
    4. an existing table, N correct items of type “NS”
    5. an existing table, N correct items of type “SS”
    6. an existing table, N correct items of types “B”, “BS”, “N”, “NS”, “S”, “SS”
  3. (P) Put item to UPDATE N lines (an existing table, N correct items “SS”) specifying:
    1. correct Expected conditions (all combinations):
      1. Expected.Value, etc
      2. ...
    2. correct ReturnConsumedCapacity:
      1. is INDEXES
      2. is TOTAL
      3. is NONE
    3. correct ReturnItemCollectionMetrics:
      1. is SIZE
      2. is NONE
    4. correct ReturnValues:
      1. is NONE
      2. is ALL_OLD
      3. is UPDATED_OLD
      4. is ALL_NEW
      5. is UPDATED_NEW
  4. Negative:
    1. Update an existing line while the key-value to be updated is in UPDATING status
    2. Update a non-existent table
    3. Update a table titled as “”
    4. Update a table by specifying only 2 letters of its title
    5. Update a table by specifying more than 256 letters of its title
    6. Insert an item:
      1. Specifying PrimaryKey as equal to the already existing line
      2. Specifying strange data type (not in B, BS, S, SS, N, NS) for a Value to be inserted
      3. Specifying two equal Key values in one operation
      4. Specifying no values for a Key
      5. Specifying non-existent Keys in “Expected” option
    7. Simulate: ConditionalCheckFailedException exception
    8. Simulate: ItemCollectionSizeLimitExceededException exception
    9. Simulate: ProvisionedThroughputExceededException exception
    10. Simulate: ResourceNotFoundException exception
  5. Add other positive and negative tests

Query

  1. General:
  2. TableName:
    • Valid
    • Invalid:
      1. Non-existent
      2. Empty
      3. Less than 3 symbols long
      4. More than 255 symbols long
      5. Exactly 3 and 255 symbols long
      6. Upper and lower cases
  3. AttributesToGet:
    • Specified
    • Not specified
    • Specified more attributes than exist in the table
    • Specified incorrect attributes:
      1. Wrong names
      2. Empty values like ""
    • Exact correct list:
      1. Select = SPECIFIC_ATTRIBUTES

=> correct result

      1. Select is

ALL_ATTRIBUTES or

ALL_PROJECTED_ATTRIBUTES or

COUNT

=> Error occurs

    • The option is not specified
    • Completely incorrect list
    • Some correct and some incorrect names in the list
    • Empty list
    • Not specified => No errors
  1. KeyConditions:
    • One Key specified:
      1. Just "B"
      2. Just "N"
      3. Just "S"
      4. One "BS"
      5. One "NS"
      6. One "SS"
    • Several keys specified:
      1. Combination of "B" + "N" + "S"
      2. Combination of all 6 types
    • Not specified
    • One INCORRECT key specified: something that is not in ("B", "N", "S", "BS", "NS", "SS")
  2. ConsistentRead:
    • True
    • Not specified
    • Something else => error
  3. ReturnConsumedCapacity:
    • is "INDEXES"
    • is "TOTAL"
    • is "NONE"
    • is Incorrect value => error
    • is Empty value => error
  4. ExclusiveStartKey:
    • is String => Records are taken starting by LastKeyValue of the previous operation
    • is Number => Records are taken starting by LastKeyValue of the previous operation
    • is Binary => Records are taken starting by LastKeyValue of the previous operation
    • is Set of S/N/B => Error
    • Not specified => No errors
    • Incorrect ESK => Error (?)
  5. IndexName:
    • CORRECT Local SI (Secondary Index)
    • CORRECT Global SI
    • NON-EXISTENT LSI
    • NON-EXISTENT GSI
    • Not specified => No errors
    • Name length < 3 symbols => Error
    • Name length > 255 symbols => Error
    • Empty index name
    • Upper case index name
    • Lower case index name
    • Mix of Upper/lower case letters in index name
  6. Limit:
    • Valid statement that returns > 10 lines,

Limit = 5

=> 5 lines returned and LastEvaluatedKey points to the last returned line

    • Valid statement that returns N lines

Limit = N*2

=> N lines returned and LastEvaluatedKey points to the last returned line

    • Valid statement that returns N (< 5) lines

Limit = 5

=> N lines returned and LastEvaluatedKey points to the last returned line

    • Valid statement that returns N (< 5) lines

Limit = 0

=> ?

    • Valid statement that returns data size > 1 MB

Limit = 100 000 (that is more than 1 MB data size)

=> Check that obtained data size is not more than 1 MB and LastEvaluatedKey points to the last returned line that does not exceed 1 MB

  1. ScanIndexForward:
    • is TRUE (by default) => data are sorted by ascending of the index key
    • is FALSE => data are sorted by descending of the index key
    • is another value => Error
    • is empty value => ?
  2. Select:
    • is ALL_ATTRIBUTES =>

Returns all of the item attributes from the specified table or index

    • is ALL_PROJECTED_ATTRIBUTES =>

Retrieves all attributes which have been projected into the index

    • is COUNT =>

Returns the number of matching items, rather than the matching items themselves

    • is SPECIFIC_ATTRIBUTES =>

Returns only the attributes listed in AttributesToGet

  1. KeyConditions:
    • One CORRECT field name

ComparisonOperator = "EQ" => Existing record should be returned (STRING, NUMBER, BOOLEAN)

    • One CORRECT field name

ComparisonOperator = "EQ"

AttributeValue is SET of Number or String or Boolean

    • One CORRECT field name

ComparisonOperator = "EQ"

Two AttributeValues specified (NUMBER and STRING)

    • One CORRECT field name (BINARY)

ComparisonOperator = "EQ"

AttributeValue is of type NUMBER or STRING => error?

    • One INCORRECT field name

ComparisonOperator = "EQ"

Valid comparison value => error ?

    • One CORRECT field name

ComparisonOperator = "EQ"

Comparison expression represents a combination thet does not exist in the actual table => No records returned

    • One CORRECT field name

INVALID ComparisonOperator

Valid comparison value => error ?

    • One CORRECT field name (Number or String or Boolean)

ComparisonOperator = "LE"

Valid comparison value (STRING or NUMBER or BOOLEAN) => ok

    • One CORRECT field name

ComparisonOperator = "LE"

Two AttributeValues specified => error?

    • One CORRECT field name

ComparisonOperator = "LE"

AttributeValue is SET of Number or String or Boolean => error ?

    • One CORRECT field name (Number or String or Boolean)

ComparisonOperator = "LT"

Valid comparison value (STRING or NUMBER or BOOLEAN) => ok

    • One CORRECT field name

ComparisonOperator = "LT"

Two AttributeValues specified => error ?

    • One CORRECT field name (a set)

ComparisonOperator = "LT"

AttributeValue is SET of the same type => error ?

    • One CORRECT field name

ComparisonOperator = "GE"

Valid comparison value (STRING or NUMBER or BOOLEAN) => ok

    • One CORRECT field name (N type)

ComparisonOperator = "GE"

Two (N and S) AttributeValues specified => error

    • One CORRECT field name

ComparisonOperator = "GE"

AttributeValue is SET of Number or String or Boolean => error

    • One CORRECT field name (Number or String or Boolean)

ComparisonOperator = "GT"

Valid comparison value (STRING or NUMBER or BOOLEAN) => ok

    • One CORRECT field name

ComparisonOperator = "GT"

Two AttributeValues specified => error ?

    • One CORRECT field name (Number or String or Boolean)

ComparisonOperator = "GT"

AttributeValue is SET of Number or String or Boolean => ok

    • One CORRECT field name

ComparisonOperator = "BEGINS_WITH"

Valid comparison value (STRING, BOOLEAN) => ok

    • One NON-EXISTENT field name

ComparisonOperator = "BEGINS_WITH"

Valid comparison value (STRING, BOOLEAN) => ok

    • One CORRECT field name

ComparisonOperator = "BEGINS_WITH"

Two AttributeValues specified = > error

    • One CORRECT field name

ComparisonOperator = "BEGINS_WITH"

AttributeValue is SET of Number or String or Boolean => error

    • One CORRECT field name

ComparisonOperator = "BETWEEN"

Two valid comparison values => ok

    • One NON-EXISTENT field name

ComparisonOperator = "BETWEEN"

Two valid comparison values => error

    • One CORRECT field name

ComparisonOperator = "BETWEEN"

Only one AttributeValue specified => error

    • One CORRECT field name

ComparisonOperator = "BETWEEN"

AttributeValue is SET of Number or String or Boolean => error

Scan

  • Reproduce: scan stops and returns results if processed data size exceeds 1 MB.
  • Scan result is empty


  • Parallel scan topic - out of scope for now


  • TableName
    • (P) scan with only required parameter (table name)
    • (P) scan if name length is 3, 255
    • (N) scan with name length less 3 or more 255: what exception should appear? nonexistent table or incorrect length?
    • upper-lower case in t.name
    • diff. symbols in t. name
    • (N) scan request without required parameter - table name
  • AttributesToGet
    • (P) Skip it: all attrs should be returned
    • (P) enumerate all params
    • (N) empty list of attrs
    • (P) the only attr in the list
      • non-key attr
      • attr that does not participate in a filter
    • (P) “If any of the requested attributes are not found, they will not appear in the result.”
      • try nonexistent attrs - should not be displayed in results?
      • Filter can find items, but selected attrs are not present in those items
        • selected attrs are present in some other items
        • selected attrs are not present in any items
    • (N) Repeat the same attr[s] in this list
  • ExclusiveStartKey
    • (P) Use LastEvaluatedKey from the previous scan. How to ensure that the scan really starts from this item?
    • (N) What if assign some existing key but scan operation was not executed before? No difference I think.
    • Negative:
      • Assign nonexistent value of key attr.
      • Assign non-key attributes and their values. Try attrs of SET type?
  • Limit
    • P: Verify just the Limit number of items was scanned and LastEvaluatedKey is present in response.
    • P: Set Limit value so that scan processes more than 1 Mb of data before Limit value exceeds. Ensure it stops due to 1 Mb but not continue till Limit items processed.
    • N: Try empty, negative value, zero.
  • ReturnConsumedCapacity
    • P: Ensure response does not contain ConsumedCapacity (neither for table nor index(es)) if ReturnConsumedCapacity not present or equal to None in request.
    • P: Ensure response contains Capacity for table and indexes if TOTAL in request.
    • P: Ensure response contains Capacity for indexes only (not table) if INDEXES in request.
    • N: Try empty, invalid values.
  • ScanFilter
    • Ensure ScanFilter really filters.
    • Ensure multiple conditions are treated as "AND" operations.
    • P?: Try nonexistent attribute name (let’s assume it will be added with some item later)
    • N: Try empty line instead of attribute name
    • N: Assign empty line, None to ScanFilter
    • AttributeValueList
      • P: Use single value for appropriate comparison
      • P: Use 2-element list for BETWEEN and IN
      •  ?: Try to use 2+ element for IN
      • N: Try to use 2-element-list for operation like EQ
      • N: Try empty list
      • N: Try to skip this parameter at all
      • P: Try data type different from attribute data type. For example, {"S":"6"} vs {"N":"6"}. does-not-match expected.
      • about SETs: most of operators do not support SET types.
        • N: Try to insert SET value for operator that does not support SET
        • P: Ensure appropriate operators really support SETs.
    • ComparisonOperator
      • P: For every comparison operator, verify it correctly compares values of every type it supports (in most cases string, number, binary). Rewrite here tests enumerated above, for AttributeValueList.
      • P: Verify each comparison operator is supported and compares correctly.
      • N: Try invalid value for comp. operator (like EQINVALID)
  • Select
    • P: Ensure ALL_ATTRIBUTES return all attributes, especially if different items have different attributes.
    • P: Ensure COUNT return just count, not items themselves.
    • P: Ensure ALL_PROJECTED_ATTRIBUTES returns all attrs projected to the index. Should I request table or index?
    • P: Set Select=SPECIFIC_ATTRIBUTES and enumerate attributes in AttributesToGet. Ensure it returns only the attributes listed in AttributesToGet (i.e. the same as without Select at all).
    • N?: Try to set Select=SPECIFIC_ATTRIBUTES if AttributesToGet was not set.
    • How ALL_PROJECTED_ATTRIBUTES should work?
    • N: Set Select to empty line or other invalid value.
    • N: Use AttributesToGet together with Select equal to ALL_ATTRIBUTES or COUNT. What about ALL_PROJECTED_ATTRIBUTES?
  • Segment - parallel scan is out of scope for now. Should be ignored by MagnetoDB.
  • TotalSegments - parallel scan is out of scope for now. Should be ignored by MagnetoDB.


  • Response
    • ConsumedCapacity
      • Ensure it returns only if requested and corresponds to requested data.
      • Will it be empty if provisioned throughput is ignored now?
    • Count
      • Ensure value is correct.
    • Items
      • Ensure its length correspond to Count.
      • Should it be present if Select=COUNT?
      • Ensure the items are correct.
    • LastEvaluatedKey
      • Ensure it’s present if limit was used and/or reached.
      • Ensure this item is present in the current results and will not be present in the next results (if it passes filter, of course).
    • ScannedCount
      • Ensure the value is correct.


  • Exceptions
    • ProvisionedThroughputExceededException
      • unable to reproduce w/o ProvisionedThroughput
    • ResourceNotFoundException
      • request nonexistent table
      • request nonexistent index
      • request table in non Active state



UpdateItem

UpdateTable

==