dotTest - Ignoring Auto-generated files
Hi,
Is it possible to ignore from a project files that are Auto-generated by other application.
I can suppress the files , but every new release I have new auto-generated files that are overriding old version.
Any suggestions ? Is it possible to ignore according to remarks on the auto-generated files.
Thanks
Best Answers
-
Hi @elch,
dotTEST can skip *.Designer and autogenerated files (files which have <AutoGen> node defined in a project file). This can be done by specifying the setting:
dottest.scope.exclude_autogen=true
Also, you can define file filters in test configuration using DTP or Test Configuration Editor (released with dotTEST 10.4.0):
If this is not an option, but you have control over how your files are generated, then you can generate area suppressions in your files or marking your files as autogenerated with some specific tags and then set up test configuration accordingly.
As a last resort, you can define -exclude pattern in dottestcli.exe command line to explicitly exclude those files from analysis scope.
1 -
Hi @elch,
Ad.1. <AutoGen> node is added to project file automatically by Visual Studio for files which Visual Studio recognizes as autogenerated, so most probably it is not your case.
Ad.2. To enable filtering by tags, please enable the following option in your test configuration:please notice that first tag in the defined setting is:
// autogenerated
thus your generated files should look like this:
// autogenerated using System; using System.Linq; namespace YourNs { public class YourClass { // ... your code ... } }
of course, you can use any other tag defined in the setting.
5
Answers
-
Hi @Tobiasz
Thanks on The detailed answer.
- So in my understanding I have to add just node in my auto generated files according to the first solution.
- In your second solution you suggested to add tags, "specific tags" Can you please elaborate on that solution , do I need to add in my files ?
Thanks In Advanced
0