Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Purpose:

The purpose of this document is to capture testing requirements for FIP-40.

Scenarios are identified here and will be implemented in javascript tests within fio.test.

Tests identified.

For each new contract action, and each getter using the identified argument

parameter/argument tests

grantee_account:

empty

too long

illegal characters

account doesnt exist

actor same as grantee

permission_name:

empty

illegal name (anything other than register_address_on_domain)

permission_info:

non empty (this field provides future extensibility of permissions and is not used for

register_address_on_domain)

object_name:

illegal format for domain

string is not domain only (me@domainname)

non existent domain

domain owner is not actor

max_fee:

empty

illegal format

less than on chain fee

tpid:

non existing address

domain only

illegal format for address

actor:

actor not signer

empty actor.

too long

non existing account

functional tests

SUCCESS --

HAPPY PATH (single domain)

use valid grantee account grantee1, permission_name, permission_info,object_name

verify contents of permissions, and access tables.

verify correct fee is used.

FAILURE -- try to set the same permission on grantee1 again after success SUCCESS -- use grantee2 set the permission again.

SUCCESS -- call remperm for grantee1. see that grantee2 is only one left in the table for

accesss,verify permission remains in permissions. verify correct fee is taken from signing account.

call remperm for grantee2, see that access table is empty and permission is removed.

(assumption is a clean table at stat of tests).

HAPPY PATH (* only for domain)

use valid grantee account grantee1, permission_name, permission_info,object_name

verify contents of permissions, and access tables.

verify correct fee is used.

FAILURE -- try to set the same permission on grantee1 again after success SUCCESS -- use grantee2 set the permission again.

SUCCESS -- call remperm for grantee1. see that grantee2 is only one left in the table for

accesss,verify permission remains in permissions. verify correct fee is taken from signing account.

call remperm for grantee2, see that access table is empty and permission is removed.

(assumption is a clean table at stat of tests).

HAPPY PATH (* after other domains granted individually)

use valid grantee account grantee1, permission_name, permission_info,object_name

verify contents of permissions, and access tables.

verify correct fee is used.

FAILURE -- try to set the same permission on grantee1 again after success SUCCESS -- use grantee2 set the permission again.

SUCCESS -- call remperm for grantee1. see that grantee2 is only one left in the table for

accesss,verify permission remains in permissions. verify correct fee is taken from signing account.

call remperm for grantee2, see that access table is empty and permission is removed.

(assumption is a clean table at stat of tests).

Getter Testing

for each new getter.

make individual regression tests for each getter.

handle happy path results. verify all json returned.

handle permission not found.

Performance tests

1 make lots of domains thousands to 10s of thousands.

2 grant permissions to thousands of accounts (several per domain owner).

3 register addresses on domains using the thousands from step2

4 call remperm until the permissions and access tables are empty..

regression tests.

run all above tests.

run all regression tests for register_fio_address. burn_expired. transfer_fio_domain.

Existing tests modified

register_fio_address

new test add address for account granted permission on a private domain.

create account grantor1

create account grantee2

grant permission to grantee2 to for register_address_on_domain for grantor1 domain.

verify that grantor domain is private

grantee2 account calls register_fio_address.

verify address is created.

new test add address for account granted permission on a public domain.

create account grantor1

create account grantee2

grant permission to grantee2 to for register_address_on_domain for grantor1 domain.

verify that grantor domain is public

grantee2 account calls register_fio_address.

verify address is created.

new test add address for account granted permission on a public domain transitioning to private.

create account grantor1

create account grantee2

grant permission to grantee2 to for register_address_on_domain for grantor1 domain.

verify that grantor domain is public

grantee2 account calls register_fio_address.

verify address is created.

make domain to be private.

grantee2 calls register_fio_address

verify that address is created.

ASSUMPTION -- existing regressions test public and private domain functionality (this will be verified)

  • No labels