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

test: introduce BDD e2e tests #124

Merged
merged 6 commits into from
Apr 27, 2023
Merged

Conversation

odubajDT
Copy link
Contributor

@odubajDT odubajDT commented Apr 21, 2023

This PR

  • adds test-harness submodule to this repository
  • adds e2e tests
  • refactors CI executing the tests

Related Issues

Fixes #111

@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Merging #124 (8b235d1) into main (b19e6e5) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #124   +/-   ##
=======================================
  Coverage   90.95%   90.95%           
=======================================
  Files          27       27           
  Lines         553      553           
  Branches       37       37           
=======================================
  Hits          503      503           
  Misses         37       37           
  Partials       13       13           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@odubajDT odubajDT marked this pull request as ready for review April 25, 2023 11:35
@odubajDT odubajDT requested a review from a team as a code owner April 25, 2023 11:35
@toddbaert
Copy link
Member

Awesome work @odubajDT ! Very good to have this in the dotnet SDK! It's a real confidence booster. I will review.


jobs:
build-test:
runs-on: windows-latest
Copy link
Member

@toddbaert toddbaert Apr 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@odubajDT I'm OK with consolidating jobs, but we need to run a build on windows-latest to ensure the integrity of the net462 build.

Also, if possible (and easy) it would be good to run the e2e tests there too. If that's not possible that's OK though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, will fix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, so in the current state the following tests are ran:

linux: unit tests with .Net 6 and .Net 7 + E2E tests
windows: unit tests with .Net 6, .Net 7 and .Net 4.6.2

Running e2e tests on windows might be a little bit problematic due to that container operations are only supported on Linux runners. Therefore we are unable to start the flagd container. I guess it is ok when the e2e tests are ran only on linux.

Hope this meets the requirements.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was worried because I didn't see test commands specifically targeting the bin\Release\net462\ folder, but it seems like they are being picked up automatically in the windows build:

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
D:\a\dotnet-sdk\dotnet-sdk\test\OpenFeature.Tests\bin\Release\net6.0\OpenFeature.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 6.0.16)
[xUnit.net 00:00:07.30]   Discovering: OpenFeature.Tests
[xUnit.net 00:00:07.54]   Discovered:  OpenFeature.Tests
[xUnit.net 00:00:07.54]   Starting:    OpenFeature.Tests

So I think we're good!

CONTRIBUTING.md Outdated Show resolved Hide resolved
@toddbaert toddbaert self-requested a review April 26, 2023 18:23
Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! The only thing blocking my approval is this.

@odubajDT odubajDT changed the title test: introduce BDD integration tests test: introduce BDD e2e tests Apr 27, 2023
@toddbaert toddbaert self-requested a review April 27, 2023 18:56
Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. This is great to finally have. Thanks @odubajDT !

@toddbaert toddbaert merged commit 8478c92 into open-feature:main Apr 27, 2023
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.

Implement cucumber integration test suite
2 participants