TeamCity: How to show Nunit3 file attachments in TeamCity test results? - nunit

NUnit3 recently added a functionality to add attachments to test results using TestContext.AddTestAttachment(). This adds a url\filelink of the file in results. I can see the entry in Test Result XML generated by console runner.
But I do not see the attachment link on Teamcity. How can I force teamcity to display the file links added as attachment.

To my knowledge, TeamCity haven't yet implemented any functionality to display test attachments.
You should make a feature request for that, here. You could add to your case by pointing out that VSTS does display these file attachments. ;-)

Related

I need to integrate junit-report results back to x-ray jira based on the ticket number on jira

I'm trying to generate a custom XML report for my cypress tests so they can map directly to a specific issue type in Xray for Jira upon import. I've read through a lot of the documentation on reporters and I've set up the configuration to generate XML files for tests/test runs so currently I can generate a combined report of my whole test suite, but when I import the file into Xray it creates new issuekeys. I already have created the test cases in Xray and I want my XML file to contain specific information on which cypress test should go to each Xray test case. Does anyone have advice or know how to do this?

How do I send html email with work items delivered from last build in VSTS?

I am trying to automate the release workflow by using VSTS pipelines, the component which i need to deliver is basically a library.
The VSTS pipeline is now building the Visual Studio solution and generating the binary files in the artifacts folder, but i need to send an email to the QA team with the list of work items which have been delivered as part of the release.
I have found a VSTS task in the marketplace which generates the release notes using MD files:
https://marketplace.visualstudio.com/items?itemName=richardfennellBM.BM-VSTS-GenerateReleaseNotes-Task&targetId=b4f49e36-84e5-48a6-b338-51f8ecc1d8d7
However, what I need is a task based on a customizable HTML template and send in the attachments a ZIP file with the content of the artifacts folder.
Anyone know how could i implement this behaviour as part of the pipeline?
How do I send html email with work items delivered from last build in VSTS?
In fact, you have already found the answer, just need to go one step further.
In the Usage and Description of Types of Template about that extension, you could get the following instructions:
but it also possible to generate other formats such as HTML with
appropriate templates.
The use of a template allows the user to define the layout and fields
shown in the release notes document. It is basically a markdown file
(or other format of your choice)
So, this extension should supports HTML format.
As test, I add that task with html template file build-basic-template.htm:
Note: Set the Output file with .htm format and template here (I use the first one).
Besides, if you want to seed email with this .htm file, you could use the Build Notification task or Send email task.
Hope this helps.

Automate the process of sending Postman Requests and save the responses in a file

I want to automate the process of sending get requests to an API and save the responses in a JSON file. I have researched a lot online and haven't found anything. I have created a collection and run it, but how do I automate it.
When you have your tests collection built in Postman, you shall run it with newman (see useful options here, this link helped me a lot !).
If your collection can be run with Postman runner, it should work perfectly. I haven't tried to generate reports in JSON but it works fine for HTML and JUnit style reports ... and you can set a specific reporting parameter to have results set in a JSON file.

Can Jenkins send email taking recepients from a checked out file?

I'm quite a new to Jenkins and I'm stuck trying to configure Jenkins to send email based on a file from checked out files.
Basically, I'm checking possibility to migrate our own build system scripts to run under Jenkins. One of the existing requirements is storing project maintainers' emails in a txt file in the repository. Out of the box Jenkins couldn't do that, perhaps some plugin can do the trick?
It would be great if somehow Jenkins (maybe through some plugin?) could send emails based on the information from checked out copy of repository.
Any help, information or a direction of search would be greatly appreciated.
Maybe with the Email Ext plugin which allows you to configure many many things about email :
Triggers - Select the conditions that should cause an email notification to be sent.
Content - Specify the content of each triggered email's subject and body.
Recipients - Specify who should receive a email when it is triggered.
I didn't find the option to directly take the recipient list from a source file, but you can extend easliy this plugin with Groovy or Jelly scripts.

ccnet email permalink to build

Is there a way to make ccnet's email publisher (or another publisher that sends emails) include a permalink to the actual build that it refers to?
I actually want to be able to link to the unit test results report, so I also need to be able to customise it a bit too, but a link to the build report of the actual build would be a good start.
I'm not sure how you would include the link to the build report but you can include the build report (or parts of it, e.g. unit test results) directly in the email. Just like in the dashboard you can format the output using xsl transformations specified in ccservice.exe.config.