getgauge / gauge-dotnet

C# runner for gauge + DotNet standard 6.0-8.0
Apache License 2.0
27 stars 21 forks source link

Adding ability to make async calls in Gauge tests #233

Closed mpekurny closed 2 months ago

mpekurny commented 2 months ago

Create ability to make async calls from Gauge tests. This also changes how the grpc calls are created and handled to allow for more DI and starting with an async handler to carry that through to the reflection call to the Gauge step or hook.

mpekurny commented 2 months ago

@chadlwilson the checks above are failing with the following errors

Error: getgauge/setup-gauge/master/action.yml (Line: 30, Col: 7): Unexpected value 'using' Error: getgauge/setup-gauge/master/action.yml (Line: 31, Col: 7): Unexpected value 'main' Error: getgauge/setup-gauge/master/action.yml (Line: 29, Col: 7): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory Error: getgauge/setup-gauge/master/action.yml (Line: 17, Col: 11): Unrecognized named-value: 'gauge-version'. Located at position 1 within expression: gauge-version == 'master' Error: getgauge/setup-gauge/master/action.yml (Line: 24, Col: 11): Unrecognized named-value: 'gauge-version'. Located at position 1 within expression: gauge-version == 'master' Error: System.ArgumentException: Unexpected type '' encountered while reading 'steps item uses'. The type 'StringToken' was expected.

I see you made a change in the setup-gauge repo, I am thinking your change is the cause of the errors above?

chadlwilson commented 2 months ago

Yeah, I'll fix it or revert shortly. No idea why these things all work off master, makes it impossible to validate anything safely.

As a side note, I'm not sure it's realistic to expect anyone to review a PR with 50,000 line changes?

mpekurny commented 2 months ago

Yeah, I get that it was a lot of changes. Maybe I could have broken up some of the changes into smaller chunks. I will keep that in mind if I ever do something like this again.

sriv commented 2 months ago

It was a big changeset, but it brought in an important feature. Most changes were due to formatting and reorg of code.

the big ones were around the launch of grpc server using WebBuilder, use of DI as opposed to hand rolled injections, some modern c# features like the usings.cs and move executors to a separate namespace. And of course the biggest deal was to make the entire flow async, so that tests with async fit in better. All good changes I believe.

Thanks a lot for the effort @mpekurny - really appreciate the work and attention to details here.

gaugebot[bot] commented 2 months ago

@mpekurny Thank you for contributing to gauge-dotnet. Your pull request has been labeled as a release candidate 🎉🎉.

Merging this PR will trigger a release.

Please bump up the version as part of this PR.

Instructions to bump the version can found at CONTRIBUTING.md

If the CONTRIBUTING.md file does not exist or does not include instructions about bumping up the version, please looks previous commits in git history to see what changes need to be done.

sriv commented 2 months ago

Just realized couple of things:

sriv commented 2 months ago

Thanks again @mpekurny - this was quite a bit of work, but a good milestone for gauge-dotnet!