0

Using the default build template on TFS 2013, we use the Post-test script to collect trx files from protractor tests, in order to include those in the build report summary.

We use vs2015 MsTest:

MSTest.exe
/publishresultsfile:...\TRXTestResult\CHROME-54.0.2840.71-results.trx 
/publish:https://.../tfs/defaultcollection
/teamproject:...
/publishbuild:...    
/platform:AnyCpu
/flavor:Release

Result:

Waiting to publish...

Publishing results of test run (test name) to https://.../tfs/defaultcollection ...

Publish completed successfully.

However, the published test result wont show up in the build report (only the default from unit test).

TfvcTemplate.12.xaml

geskill
  • 307
  • 2
  • 8

1 Answers1

1

This can't be achieved by a simple test script. You need to create a custom activity to handle this.

Inside this activity you can handle everything that is necessary to run the protractor tests and publish the test results. With the custom activity you are also able to integrate the automated protractor tests very easy into different build templates. This improves the reusability in a great way.

Then you need to create the custom build template and integration into a TFS Build. More details please refer the tutorial from this blog: Automated UI testing of AngularJS applications using TFS

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62