Skip to content

KeesV/kv-vsts-ViewLatestTestResult

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kv-vsts-ViewLatestTestResult

A custom VSTS extension that displays the latest test results for a test case on the work item form.

Details

  • Adds a custom control that you can add to the Test Case work item type
  • When loading the control, the extension will:
  • Check if it's loaded from a test case. If the currently opened work item is not a Test Case, an error will be shown.
  • Query VSTS for the test plans, suites and configurations in which this Test Case was included
  • For each test plan, suite and configuration will display the latest test result in a grid
  • From each entry in the grid, you can open the context menu to jump to the related test plan, suite or run

Getting started for VSTS

  • Install the extension
  • Navigate to the customization page for the Test Case work item type in your process template. You might need to create a custom process template first. Refer to the documentation to get started with that. Then, add a new page to the work item type. customize-wit-addpage
  • Then, add a new group to the new page customize-wit-addgroup
  • When the group is created, add the custom control to it customize-wit-addcustomcontrol
  • The control doesn't need any configuration, so you can just click OK customize-wit-addcustomcontrol2
  • The Test Case work item type will now contain an additional tab that shows the latest test results for that Test Case

Getting started for TFS

In case of TFS, "classic" Process Template customization needs to be applied (changing XML files).

  • Install the extension
  • Start the Developer Command Prompt (Visual Studio presence is a requirement)
  • Execute the following line (replace params with your own), this exports the Test Case definition:
witadmin exportwitd /collection:CollectionURL /p:Project /n:"Test Case" /f:FileName
  • Open the file in a text editor and scroll down to the WebLayout section. Add the following lines just below the <WebLayout> tag:
<Extensions>
   <Extension Id="keesverhaar.viewlatesttestresult" />
</Extensions>
  • Add the following lines just above the closing </WebLayout> tag
<Page Label="Test results" LayoutMode="FirstColumnWide">
  <Section>
	<Group Label="Test results">
	  <ControlContribution Label="Test results" Id="keesverhaar.viewlatesttestresult.test-results-control">
	  </ControlContribution>
	</Group>
  </Section>
</Page>
  • Import the Test Case Work Item using the following command (replace params with your own):
witadmin importwitd /collection:CollectionURL /p:Project /f:FileName

For more information on this procedure, please check the Microsoft documentation: https://docs.microsoft.com/en-us/vsts/extend/develop/configure-workitemform-extensions?view=vsts

Screenshots

  1. The "Test Results" tab on a Test Case testresults-tab
  2. The context menu to jump to related test plan, suite or run testresults-contextmenu

Contributing

Feel free to fork this repository and submit a pull request if you have any improvements!

About

VSTS Extension for viewing latest test result on a test case work item

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published