earloc / postomate Goto Github PK
View Code? Open in Web Editor NEWA library to automate and orchestrate requests out of a postman-collection with .net
License: MIT License
A library to automate and orchestrate requests out of a postman-collection with .net
License: MIT License
When using SpecFlows ScenarioContext to find requests, there should be an easier way to find matching requests based on the current context.
E.g.:
When executed in a scenarios steps, we currently need to deep-dive into the current scenario-context in order to gather the needed information to find a matching request, e.g.:
var request = featureFolder.FindRaw(scenarioContext.StepContext.StepInfo.BindingMatch.StepBinding.Regex, variables);
This should be shortened significantly, preserving the possibility to leverage either a simple string
or a RegEx
for finding requests.
Maybe this would be OK to do via special extensions/overloads, which accept a ScenarioContext or so in
However, this possibly would need to be done in a seperate Postomate.Extensions.*
-assembly.
When authoring parameterizable postman-collections, we end up in collections containing requests that for themselfs might not be executable anymore.
E.g.: the following request is not executable without specifying values for the given variables (like via an environment?!):
We need to ensure that Postman knows about the two variables firstName
and surname
.
When automating these requests, this is quite straight forward, by leveraging one of the IVariableContext
-implementations:
variables = new ImmutableVariableContext(new {
baseUrl = api.BaseAddress?.ToString().Trim('/') ?? "http://localhost:5042"
});
and later:
var createArthurRequest = folder.FindRaw("PostPerson", variables.Enrich(new {
firstName = "Arthur",
surname = "Dent"
}));
However, we lose tha ability to just fire the request out of Postman itself, without finding a good way to actually specify values for the variables.
The current way is to add a pre-request script, which fills the variables with appropriate values prior sending the request.
Is there another, better way? Especially to ensure completeness (that is, ensuring that every possible variable actually gets a meaningful value?)...
Regardless of the above question, this approach should be documented in the repo´s readme.
Showcase the usage of this lib in the repo-readme.
graphQL-requests are currently not enabled.
In order to support these, the draft-implementations should be included again, see GraphQlRequest
.
In order to close the issue, there should be:
Postomoate.Tests.api
-projectpostomate.postman_collection.json
Currently, there are two build-yamls, which only differ in their trigger:
on:
push:
branches: [ main ]
on:
pull_request:
branches: [ main ]
this should be harmonized somehow:
Later, there should also be some steps/actions for pushing everything into NuGet, but that is probably a new gh-actions?!
The current parsing that is done directly in the core models (RequestCollection
, RawRequest
, etc. seems to be too coupled on the actual postman-schema.
In order to maybe support other sources, like e.g. Insomnia or SOAP-UI, the actual parsing of source-requests should be decoupled in a way that is more extensible.
Work done in this issue should also relocate the models from the Postomate.Postman
-namespace into the root namespace Postomate
, denoting a breaking-change. Gladly, there is no official package out, yet - so this is absolutely a no-brainer.
The resulting design should presumably abstract away the details needed to fill the models, regardless of the actual source - even if the only source currently is a postman-collection.
Readme should explain a few things:
There should be an official NuGet-package available for consumers to pick up.
A good baseline is available via #8. Now we should actually publish the stuff into the feed for others to consume!
Form-url-encoded-requests are currently not enabled.
In order to support these, the draft-implementations should be included again, see FormUrlEncodedRequest
.
In order to close the issue, there should be:
Would be cool, if we somehow could leverage existing assertions made within postman after firing requests. This way, the need for custom parsing and asserting on responses could be relaxed in a way, that drastically reduces boilerplate in the test-code
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.