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

E2E postman tests #242

Merged
merged 7 commits into from
Feb 13, 2024
Merged

E2E postman tests #242

merged 7 commits into from
Feb 13, 2024

Conversation

torbacz
Copy link
Contributor

@torbacz torbacz commented Feb 9, 2024

Description

  • Implemented E2E tests for WebServer using postman collection

Motivation and Context

  • A road to parameters in URL :)

How Has This Been Tested?

  • ESP32 with latest firmware
  • Postman tests

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
  • I have added new tests to cover my changes.

@nfbot nfbot changed the title E2E postman tests. E2E postman tests Feb 9, 2024
@torbacz
Copy link
Contributor Author

torbacz commented Feb 9, 2024

There are 2 requests that I can't get working. They are marked as "[NotWorking]".

Copy link
Member

@Ellerbach Ellerbach left a comment

Choose a reason for hiding this comment

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

The file must be created before reading. So you have first to call the API to create the file, then you can read it.
And for the basic auth, what's not working?

README.md Show resolved Hide resolved
Copy link
Member

@Ellerbach Ellerbach left a comment

Choose a reason for hiding this comment

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

I've been adjusting the tests and also fixed few things (PR to come):
image

And a new json file:

nanoFramework WebServer E2E Tests.postman_collection.json

@torbacz
Copy link
Contributor Author

torbacz commented Feb 12, 2024

The file must be created before reading. So you have first to call the API to create the file, then you can read it. And for the basic auth, what's not working?

I think that second issue was providing "Authorization:Basic" without any credentials. And then server hangs. But we can skip it for now.

@torbacz
Copy link
Contributor Author

torbacz commented Feb 12, 2024

Collection updated. I think we can merge it now and create more tests as required in future.

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@Ellerbach Ellerbach left a comment

Choose a reason for hiding this comment

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

Thanks for adding this, it will be handy to make sure the web server always works as expected when we have changes on it!

@Ellerbach Ellerbach merged commit c8632ec into nanoframework:main Feb 13, 2024
5 checks passed
@torbacz torbacz deleted the updateTests branch February 13, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants