0

im currently facing the issue that i am not able to test "only the things that have changed" in a change-set using vnext with tfs 2017.

when using the "run functional test" step, i can only choose a test assembly but it will always test the changes with the solution i've picked and all tests within the test assembly.

i've tried to split test assemblys into more test categories but running all 2000 tests against a change on 1 file seems little bit too much.

is there a way to only run tests against source code that has been changed? we want to decrease test time.

1 Answers1

0

You can set multiple test assemblies and separate by semicolon, such as you can specify **\commontests\*test*.dll; **\frontendtests\*test*.dll as Test Assembly for run functional tests task.

If changes come from your feature project, you should test all assemblies. If changes come from part of your test projects, you can only test the changed test assemblies. You can achieve it by two build definition: first build definition with power shell task, second build definition is your current build.

Power shell task in first build (detect what changes and queue second buils):

  • If the feature project changed, specify your second build with **\*test*.dll for test assembly, and then queue your second build.
  • If part of test projects changed, specify your second build with **\*project1test*.dll; **\*project1test*.dll etc for test assembly, and then queue your second build.
Marina Liu
  • 36,876
  • 5
  • 61
  • 74
  • im sorry but that does not answer the question. manually setting test assemblys is no automation process at all. i want to test incremental. –  Jul 05 '17 at 08:00