SpecSync.Plugin.PostmanTestSource
5.0.0
Prefix Reserved
dotnet add package SpecSync.Plugin.PostmanTestSource --version 5.0.0
NuGet\Install-Package SpecSync.Plugin.PostmanTestSource -Version 5.0.0
<PackageReference Include="SpecSync.Plugin.PostmanTestSource" Version="5.0.0" />
<PackageVersion Include="SpecSync.Plugin.PostmanTestSource" Version="5.0.0" />
<PackageReference Include="SpecSync.Plugin.PostmanTestSource" />
paket add SpecSync.Plugin.PostmanTestSource --version 5.0.0
#r "nuget: SpecSync.Plugin.PostmanTestSource, 5.0.0"
#:package SpecSync.Plugin.PostmanTestSource@5.0.0
#addin nuget:?package=SpecSync.Plugin.PostmanTestSource&version=5.0.0
#tool nuget:?package=SpecSync.Plugin.PostmanTestSource&version=5.0.0
Postman Test Source SpecSync Plugin: SpecSync.Plugin.PostmanTestSource
This plugin can be used to synchronize test from a Postman collection and publish results executed with Newman.
You can find more information about the SpecSync sample plugins in the repository page.
- Plugin package: SpecSync.Plugin.PostmanTestSource
- Plugin source: SpecSync.Plugin.PostmanTestSource
- Sample project: SampleProject
The plugin require a SpecSync Enterprise license to run. Please contact us to get an evaluation license that you can use to try out this plugin.
Synchronizing Postman Tests
The plugin connects to the Postman cloud server and loads the configured Postman collection. From the collection it detects tests as:
- Folders or requests that have been already linked to Test Cases by SpecSync (via documentation section)
- Optional: Folders or requests that have a name matches to the configured regex (e.g. name starts with
TEST). Use thetestNameRegexparameter for this. - Optional: Folders or requests that have a documentation matches to the configured regex (e.g. documentation contains
ADO Test Case = 1234). User thetestDocumentationRegexparameter for this. - Requests where their folder is not a test
The Postman tests can be enhanced with specific additional details that are required or useful for Test Case syncrhonization.
These details are stored in the "documentation" of the Postman folder or request item in a special section with heading SpecSync (you can configure the heading name to different values).
The section can contain a bulleted list with different values:
- The ID (and link) to the connected Test Case:
- tc: 1234. Thetcprefix can be changed by configuring a different prefix insynchronization/testCaseTagPrefix. - Tags that should be synchronized as Test Case tags: Use a
- tags:bullet point and put the tags as separate sub bullet points. - Links to other work items: Use a
- links:bullet point and put the links as separate sub bullet points as- story: 1234, wherestoryis a prefix configured insynchronization/links. The ID value can be a link, eg.[1234](https://...).
SpecSync will synchronzie the request(s) inside the test and the pm.test tests as individial test steps in the Test Case.
For example a sample documentation in Postman might be like:
This endpoint echoes the HTTP headers, request parameters and the complete
URI requested.
## SpecSync
- tc: [201](https://dev.azure.com/specsync-demo/specsync-plugins-demo/_workitems/edit/201)
- tags:
- tag1
- tag2
- links:
- story: [131](https://dev.azure.com/specsync-demo/specsync-plugins-demo/_workitems/edit/131)
Plugin Parameters
collectionId: Specify the ID of the Postman Collection.postmanApiKey: Specify your Postman API key or set the POSTMAN_API_KEY environment variable.metadataHeading: Set the heading name of the section in the Postman item documentation that contains the SpecSync settings. Optional,SpecSyncis used by default.testNameRegex: A regular expression that matches to folders names that should be treated as tests. Optional. E.g.^TEST-, if all test-folders name starts withTEST-.testDocumentationRegex: A regular expression that matches to folders documentation that should be treated as tests. Optional. E.g. to use## Azure DevOpsas heading, you have to set the parameter toAzure DevOps.testCaseLinkTemplate: Specify the URL template of the Test Case. Optional, it has to be specified for Jira only.
Publishing Test Results
The plugin can also publish test execution results to the synchronized Test Cases. For that first you need to run the Postman tests using "Newman" using the junit reporter. E.g.
newman run "https://api.getpostman.com/collections/26495037-5c8d6f15-b2a3-4b47-ae1d-72dd3bc1b49b?apikey=${env:POSTMAN_API_KEY}" --reporters "cli,junit" --reporter-junit-export TestResults\result.xml
Once the tests have executed and the result XML file has been created, you can use the SpecSync publish-test-results command with the NewmanJUnitXml format to publish the results to the remote server.
dotnet specsync publish-test-results -r .\TestResults\result.xml -f NewmanJUnitXml
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- SpecSync.PluginDependency (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Please check https://github.com/specsolutions/specsync-sample-plugins/releases for release note details.