You are on page 1of 2

2/14/22, 7:58 PM DB management | Altooro Wiki

󰋜 / DevOps / Automation / DynamoWrapper

DB management

DB management ¶

Background:

▸ AWS managed dynamo DB, for further info 󰏌

▸ Used for storing users that are gonna be used in the tests

▸ Motivation against using hard-coded uses:

▸ Avoiding collisons On different test sessions(Ex: when site is testing.altooro.com)

DB Schema:

▸ email

▸ alt_password

▸ gmail_password

▸ usage:

▸ free: users with user_plan="free"

▸ basic: users with user_plan="basic"

▸ premium: users with user_plan="premium"

▸ restore: used for the forgot password tests, used a dedicated user type since the tests update the
alt_password, so a dedicated user type will limit the damage in case of bug in the tests

▸ registration: used for registration tests, those users get deleted at the end of a test, same reason as the
restore user for the dedicated user type

▸ single_login: depricated

▸ in_use: is user occupied

DynamoWrapper:
Attribute in the Platform responsible for managing the users

Attributes:

https://wiki.altooro.com/en/DevOps/Automation/DynamoWrapper 1/2
2/14/22, 7:58 PM DB management | Altooro Wiki

▸ users(list) - a local modeling of the DB - used for storing an updated state of the DB locally, reduces DB queries

▸ each entry is an object of type User

▸ currentuser(string) - the email of the currently logged in user

▸ should_update - determines if updates should be applied to upstream DB

▸ site(str) - same as should_update

Functions:

▸ occupy_user(user) - occupys user in db/local datastructure

▸ getuserfrom_db(usage) - gets a user that's not occupied with the specified usage from the upstream DB

▸ get_user(usage) - returns a user that's not occupied and has the specified usage

▸ release_user(email) - releases user from local datastructure and upstream DB if needed

▸ deletes user if the usage == “registration” 

© 2022 Altooro. All rights reserved. | Powered by Wiki.js

https://wiki.altooro.com/en/DevOps/Automation/DynamoWrapper 2/2

You might also like