Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a context in Faker library #85

Open
dschweie opened this issue Feb 7, 2024 · 0 comments
Open

Support a context in Faker library #85

dschweie opened this issue Feb 7, 2024 · 0 comments

Comments

@dschweie
Copy link

dschweie commented Feb 7, 2024

As a Technical Test Engineer I want Faker to support a context to create new items which correlate to the existing data.

A test case often consumes a number of data points and in many cases data points should be reasonable.
Set context RoboCon ${zip} Postalcode ${city} City
When I execute code I want to have a 'zip' which is related to 'city'.

Faker Library should by default have not default context so it is allowed to deliver completely random values.

Set Context

If I set a context I want faker to remember the generated data and generate new data matching.
'Set context RoboCon
${city} City
${town} City
Should Be Equal ${city} ${town}'

Note: Faker can store data on a Lazy-Initialization because there is no need to create any pre defined set of data.

Switch Context

Faker should be able to handle multiple contexts and should provide a keyword to switch context.

Drop Context

Faker should be able to drop a context. When I call the keyword Faker can forget the generated data points.

Configure Context

Faker should provide keywords to set environment options to a context. I want to localize a context e.g. to 'de_DE'. In this case I want Faker to generate e.g. a german address or names.

Duplicate Context

Faker should provide the keyword 'Duplicate Context'. This keyword needs a new alias and sets a new context and by default only configured options will be copied.
If I only set a new alias the data will be copied from current context.
Additional parameter should allow to copy configuration from another context identified by its alias.

Reset Context

Especially in Performance testing you want to use new data set in the next iteration. So it should be possible to keep the alias and configration but all generated data points should be deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant