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

HTML report doesn't include correct method and path when creating request using builder #511

Closed
heyrutvik opened this issue Aug 15, 2022 · 3 comments · Fixed by #512
Closed

Comments

@heyrutvik
Copy link

First all of thank you for making this tool. 🙏

version: 0.16.4-dev

I need to include header in POST request so I'm following standard practice of creating a request using builder. The mechanism is working fine but the final report doesn't capture it correctly. Here is the screenshot and code snippet,

let req_builder = user
    .get_request_builder(&GooseMethod::Post, "/payments")?
    .header("API-KEY", "test")
    .json(&payload);

let request = GooseRequest::builder().set_request_builder(req_builder).build();

Screenshot from 2022-08-15 16-01-11

I looked into the code and figured that GooseRequestBuilder sets GET to method by default. And since I'm using request_builder to set header, path and method information, it doesn't reflect in GooseRequest value. So after setting a request builder, I'm setting method and path (redundant) as following,

let req_builder = user
    .get_request_builder(&GooseMethod::Post, "/payments")?
    .header("API-KEY", "test")
    .json(&payload);

let request = GooseRequest::builder()
    .set_request_builder(req_builder)
    .path("/payments")
    .method(GooseMethod::Post)
    .build();

Screenshot from 2022-08-15 16-10-16

I think there should be no need to set those values again once we specified in builder, and while calling set_request_builder respective state should get updated as per provided argument. As of now, I couldn't find a way to get those information out of request builder. Please guide me if I'm doing anything wrong, or let me know if I can help you to fix this. Thanks!

@heyrutvik
Copy link
Author

@jeremyandrews is there a developer channel to get into discussions and for folks who want to help out? I tried to look for one but couldn't find any. I'm seeing we are moving from taskset/task to scenario/transaction terminology, and with some really useful features. Let me know if I can help you to get it release any faster! 🙂

@jeremyandrews
Copy link
Member

@heyrutvik at this time there's no real-time medium. Instead, it's preferred that you help out through github issues and pull requests in a more asynchronous fashion.

Thanks for the bug report -- definitely sounds like an issue that needs to be fixed. I'll aim to review shortly.

@heyrutvik
Copy link
Author

@jeremyandrews @slashrsm Thank you!

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 a pull request may close this issue.

2 participants