Jump to: navigation, search

MagnetoDB/QA/Test cases

< MagnetoDB
Revision as of 21:04, 26 March 2014 by Max U (talk | contribs)

KVSaaS Test Cases and Ideas

BatchGetItem

BatchWriteItem

#
Description
Results
T
Imp
Notes

General



BWI-1

Complete set of correct options


P


PutRequest



BWI-10

Correct Item string AND

"N" : "string" value


P


BWI-11

Non-existent Item string AND

"N" : "string" value

Error + UnprocessedItems contains unprocessed PutRequest Items

N


BWI-12

EMPTY Item string AND

"N" : "string"

Error + UnprocessedItems contains unprocessed PutRequest Items

N


BWI-13

Correct Item string and

"NS" : ["string"] values



BWI-14

Correct Item string and

"B" : "string" value



BWI-15

Correct Item string and

"BS" : ["string"] values



BWI-16

Correct Item string and

"S" : "string" value



BWI-17

Correct Item string and

"N" : EMPTY value

ValidationException + UnprocessedItems contains unprocessed PutRequest Items


BWI-18

Correct Item string and

"<SOME_STRANGE_OR_EMPTY_VALUE>" : "string" value

ValidationException + UnprocessedItems contains unprocessed PutRequest Items


BWI-19

Correct Item string and

"NS" : "non-existent_string" value

ValidationException + UnprocessedItems contains unprocessed PutRequest Items


BWI-20




DeleteRequest



BWI-30

Correct Key string and

"N" : "string" value



BWI-31

Non-existent Key string and

"N" : "string" value

Error + UnprocessedItems contains unprocessed DeleteRequest Items


BWI-32

EMPTY Key string and

"N" : "string" value

Error + UnprocessedItems contains unprocessed DeleteRequest Items


BWI-33

correct Key string and

"NS" : ["string"] values



BWI-34

correct Key string and

"B" : "string" value



BWI-35

correct Key string and

"BS" : ["string"] values



BWI-36

correct Key string and

"S" : "string" value



BWI-37

Correct Key string and

"SS" : ["string"] values



CombinedRequest



BWI-40

Specify in one statement:

correct Key string for

DeleteRequest "N" : "string" value AND

correct Item string for

PutRequest "N" : "string" value



BWI-41

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



BWI-42

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


RequestItems (TableName)



BWI-50

correct table name and

correct PutRequest parameters for the Item

Line(s) added correctly


BWI-51

Specify 25 correct table names and

correct PutRequest parameters for the Items

Line(s) added correctly into all 25 tables


BWI-52

Specify 26 correct table names and

correct PutRequest parameters for the Items

error/exception (?)


BWI-53

correct table name and

correct DeleteRequest parameters for the Key

Line(s) deleted correctly


BWI-54

INcorrect table name

correct PutRequest parameters for an Item

Check that UnprocessedItems contains unprocessed PutRequest Items:

  • TableName < 3 symbols
  • TableName > 255 symbols
  • Non-existent table name

Exception


BWI-55

Correct table name and

correct PutRequest parameters for the Item

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

error


BWI-56

correct table name and

correct PutRequest parameters for the Item

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

error


ReturnItemCollectionMetrics



BWI-60

is NONE (by default)

no statistics returned


BWI-61

is SIZE

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


BWI-62

is <Something_else>

error/exception


ReturnConsumedCapacity



BWI-63

is NONE (by default)


ConsumedCapacity is not included in the response


BWI-64

is TOTAL

the response includes ConsumedCapacity data for tables and indexes


BWI-65

is INDEXES

the response includes ConsumedCapacity for indexes only


BWI-66

is <Something_else> (and empty)

error/exception


Exceptions



BWI-70

Simulate InternalServerError



BWI-71

Simulate ItemCollectionSizeLimitExceededException



BWI-72

Simulate ProvisionedThroughputExceededException



BWI-73

Simulate ResourceNotFoundException



BWI-





CreateTable

#
Description
Results
T
Imp
Notes

General



CreT-1

Create table without any optional attributes, only all mandatory


P


CreT-2

Create a table specifying ALL (including mandatory) the correct parameters


P


CreT-3

Try to create two tables with the same name in the same region

ResourceInUseException expected.

N


CreT-

Try to create two tables with the same name in two different regions.


N


CreT-

Verify first status is CREATING, then ACTIVE


P


CreT-

What happens if read/write to/from table in CREATING state? Possible to reproduce?


N


CreT-

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?



CreT-

Try to create table w/o some mandatory attribute: AttributeDefinitions, KeySchema, ProvisionedThroughput, TableName.


N


AttributeDefinitions



Number of attributes



CreT-

create table with 1 attr


P


CreT-

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?



CreT-

Create a table with key and non-key (and non-index also) attributes. It should fail. Non-key attrs are unacceptable.

Note:

Test for PutItem: PutItem not containing values for non-key/non-indexed attributes of the table to ensure these attrs are not required.

Error/exception ?


AttrName



CreT-

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).


P


CreT-

Try lengh 255+1 for key and indexes attr.


N


CreT-

Check size of non-key / non-index-projected attr names


N


CreT-

Try to send attr names without attr types.


N


CreT-

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).


P


CreT-

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?



CreT-

Try to create a table with attribute of some SET type. It should not be allowed.



KeySchema



CreT-

Create table with a key of HASH type.


P


CreT-

Create table with a key of HASH and RANGE type.


P


CreT-

Try to enumerate key attrs in wrong order: RANGE and then HASH attrs in the KeySchema list


N


CreT-

Try to create a table only with RANGE key


N


CreT-

Try to leave the list empty


N


CreT-

Try to add more than one HASH and/or RANGE attr. In general, add more than 2 attrs to the list.


N


CreT-

Try keytype different from HASH and RANGE.


N


CreT-

Try not to mention key attr in Definitions but only in KeySchema.


N


CreT-

Try to mention attr names not defined in AttrDefinitions.


N


ProvisionedThroughput

(for now, MagnetoDB ignores these values.)



CreT-

Set positive values.


P


CreT-

Try to mention not all mandatory attrs


N


CreT-

Try to pass non-number, negative number


N


TableName



CreT-

Name length is 3


P


CreT-

Name length is 255


P


CreT-

Name length < 3


N


CreT-

Name length > 255


N


CreT-

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.”



CreT-

Provide an empty table name.

exception ?

N


LocalSecondaryIndexes



CreT-

Create index without some of mandatory attributes.


N


Number of indexes



CreT-

Create 1 index for a table


P


CreT-

Create 5 indexes for the table


P


CreT-

Create 6 indexes for the table


N


CreT-

Set LSI attribute as an empty list



CreT-

“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



CreT-

Create an index having 3 characters long name


P


CreT-

Create an index having 255 characters long name


P


CreT-

Create an index having 2 characters long name


N


CreT-

Create an index having 256 characters long name


N


CreT-

TO BE CLARIFIED: Is it case-sensitive? non-letters?



CreT-

Create 2 tables with similar index names.

successful

P


CreT-

Try to create 2 indexes with the same name in one table

error

N


KeySchema



CreT-

Create LSI with Hash different from table hash key (table should have H+R key).



CreT-

Create LSI for table with HASH w/o RANGE. Should fail. But will work for global indexes.



CreT-

Create similar indexes with different names (the same keys, etc)



CreT-

create an index just with HASH key, w/o RANGE



CreT-

‘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.”



CreT-

Test for PutItem: Ensure range key of LSI is not a mandatory attribute.



Projection



CreT-

Check usage of all projection types: KEYS_ONLY, INCLUDE, ALL. Query tests verify that it works as expected.


P


CreT-

Use NonKeyAttributes but skip ProjectionType


N


CreT-

Use NonKeyAttributes list with one attribute in it


P


CreT-

Use key attrs in the NonKeyAttributes list


N


CreT-

Make NonKeyAttributes list empty



N


CreT-

Insert some non-key attrs in NonKeyAttributes list when Pr.Type is KEYS_ONLY. Then - similar but with ALL case.


N


CreT-

Create a table with 20 non-key attrs in one LSI.


P


CreT-

Create a table with 21 non-key attrs in one LSI.


N


CreT-

Create a table with 20 non-key attrs in multiple LSIs.


P


CreT-

Create a table with 21 non-key attrs in diff. LSIs, without repetitions of attr names.


N


CreT-

Create a table with 21 non-key attrs in diff. LSIs, with repetitions of attr names between LSI’s.


N


GlobalSecondaryIndexes



(out of scope now)



Response



CreT-

Most of key-values in TableDescription are equal to data from Request

Check and 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


P


CreT-

Attrs not present in Request but should be present in Response

  • CreationDateTime
  • ItemCount (should be 0 just after table creation)
  • TableSizeBytes (should be 0 on creation)
  • TableStatus (should be CREATING, then ACTIVE)
P


CreT-

If LSI are not created, should this attr be present in response as empty list?



CreT-

Think how to check TableSizeBytes value.



CreT-

CreationDateTime verification: Find a way to get current time from the target system



Exceptions



CreT-

LimitExceededException:

Is related to in-progress states. Not possible to reproduce for now.


N


CreT-

ResourceInUseException:

Recreate existing table (the case was mentioned above)


N


CreT-

InternalServerError:

When this error [500] is expected and when some other error should appear?


N


Additional



CreT-

Create more than 255 tables


N


CreT-





DeleteItem

DeleteTable

#
Description
Results
T
Imp
Notes

General



DelT-1

Delete an existing table. Check if all the Response’s fields (see Table Description object) are equal to the appropriate table parameters


P


DelT-

Delete a non-existent table

ResourceNotFoundException

N


DelT-

Delete a table specifying “” as a name


N


DelT-

Delete a table specifying NULL as a name


N


DelT-

Delete a table w/o specifying any parameters


N


DelT-

Delete a table having a name that contains only 2 or 1 symbol


N


DelT-

Delete a table specifying a name that contains more than 255 symbols

ResourceNotFoundException ?

N


DelT-

Delete an existing table and, while the status is DELETING, run DeleteTable operation for the same table once again


P


Results Verification



DelT-




Exceptions



DelT-

Simulate InternalServerError exception. Ideas?


N


DelT-

Simulate LimitExceededException exception. Ideas?

Delete more than 10 tables in the same time


N


DelT-

Simulate ResourceInUseException exception. Ideas?

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


N


DelT-

Simulate ResourceNotFoundException exception. Other ideas?


N


DelT-




DelT-






DescribeTable

#
Description
Results
T
Imp
Notes

General



DesT-1

Run DescribeTable against the existing table. Check that all the required params are described correctly (see “Response Syntax” for DescribeTable statement)


P


DesT-

Run DescribeTable against the non-existent table (ResourceNotFoundException exception)


N


DesT-

Run DescribeTable specifying “” as a table name


N


DesT-

Run DescribeTable specifying NULL as a name


N


DesT-

Run DescribeTable w/o specifying any parameters


N


DesT-

Run DescribeTable specifying a name that contains only 2 or 1 symbol (causes an exception?)


N


DesT-

Run DescribeTable specifying a name that contains more than 255 symbols


N


DesT-

Simulate InternalServerError exception


N


DesT-




DesT-




DesT-





GetItem

#
Description
Results
T
Imp
Notes

General



GI-1

Get an item specifying correct mandatory attributes


P


GI-

Get an item specifying all the correct mandatory and optional ttributes


P


TableName



GI-

Valid (existing) table name


P
Y


GI-

Existing table name of 3 symbols


P
Y


GI-

Existing table name of 255 symbols


P
Y


GI-

From non-existent table name


N


GI-

Empty name (“”)


N


GI-

Less than 3 symbols long


N


GI-

More than 255 symbols long


N


AttributesToGet:



GI-

Specified, correct items in the list


P
Y


GI-

Section not specified


P
Y


GI-

“AttributesToGet” term not specified, but there is a list of items in the section

Exception/error

N


GI-

Section AttributesToGet is specified, but there is just an empty list (no items)

Exception/error

N


GI-

Specified more attributes than exist in the table

Exception/error

N


GI-

Incorrect attributes: Wrong names

Exception/error


GI-

Incorrect attributes: Empty values like ""

Exception/error

N


Key



GI-

One Key specified: “B”


P


GI-

One Key specified: “N”


P


GI-

One Key specified: “S”


P


GI-

One key: “BS”



GI-

One key: “NS”



GI-

One key: “SS”



GI-

Combination of "B", "N", "S" types



GI-

Combination of "B", "N", "S", "BS", "NS", "SS" types



GI-

Combination of “B”, “B”, "N", "N", “S”, “S”, “BS”, “BS”, "NS", "NS", “SS”, “SS” types



GI-

The whole section “Key” not specified

Exception/error

N


GI-

Section “Key” specified, but the section content is empty

Exception/error

N


GI-

One incorrect key specified: something that is not in ("B", "N", "S", "BS", "NS", "SS")

Exception/error

N


GI-

In section “Key” there is a key of type “N” but a non-existent value specified for it

No items returned in Response

N
Y


ConsistentRead



GI-

= True


P


GI-

= False


P


GI-

Not specified


P


GI-

= <Something_else>


N


ReturnConsumedCapacity



GI-

= INDEXES


P


GI-

= TOTAL


P


GI-

= NONE


P


GI-

= <Something_else>


N


Exceptions



GI-

Simulate ConditionalCheckFailedException


N


GI-

Simulate InternalServerError


N


GI-

Simulate ItemCollectionSizeLimitExceededException


N


GI-

Simulate ProvisionedThroughputExceededException


N


GI-

Simulate ResourceNotFoundException


N


GI-





ListTables

#
Description
Results
T
Imp
Notes

General



LisT-1




LisT-2




LisT-3





PutItem

#
Description
Results
T
Imp
Notes

General



PI-1




PI-2




PI-3





Query

#
Description
Results
T
Imp
Notes

General



Q-1




Q-2




Q-3





Scan

#
Description
Results
T
Imp
Notes

General



Sc-1




Sc-2




Sc-3





UpdateItem

UpdateTable

==