FIP-40 QA testing plan

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.

 

QA Test implementation

links

https://github.com/fioprotocol/fio.test/pull/344

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)

mixed case for permitted name.

 

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

mixed case domain, same domain is used.

domain owner is not actor

domain max length exceeded.

domain max length success

 

 

max_fee:

empty

illegal format

less than on chain fee

tpid: (errors ignored, no error reported)

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.

verify that other (non-grantee) accounts still can not register on the private domain with the permission

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.

verify that other (non-grantee) accounts can still register on the public domain with the permission

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)

new test - grant and remove grant permissions to multiple grantees on private domain (various scenarios)

create account grantor1, etc.

create account grantee1

create account grantee2

grant permission to grantee1

grantee1 registers address

grant permission to grantee2

grantee2 registers address

Other regression tests

  • Add grantee1, remove grantee1, re-add same grantee1 and make sure things still work

  • Add the same grantee to several different domains and confirm they can register on all granted domains

Other core tests:

  • Add test to ram.js to confirm RAM bump.