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

#222: Allow naming of tasks without naming requests #580

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alecsmrekar
Copy link
Contributor

@alecsmrekar alecsmrekar commented Jan 19, 2024

#222

This is an attempt at giving the user the option to name a transaction without that name affecting the name of the requests inside of it.

At the core of it is the new enum TransactionName, that basically forces you to decide if you need the transaction name in the context of the transaction, or in the context of a request.

Can can test this by registering a transactions in the two following ways and checking out the resulting results (either csv, text or html).

GooseAttack::initialize()?
        .register_scenario(
            scenario!("Some Scenario")
                .register_transaction(transaction!(test).set_name("My Transaction")),
        )
        .execute()
        .await?;

or

GooseAttack::initialize()?
        .register_scenario(
            scenario!("Some Scenario")
                .register_transaction(transaction!(test).set_name_transaction_only("My Transaction")),
        )
        .execute()
        .await?;

I know I probably did some mistakes with how to optimally deal with the borrow checker, but I'm here to learn.

@alecsmrekar alecsmrekar marked this pull request as ready for review January 19, 2024 18:46
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

Successfully merging this pull request may close these issues.

1 participant