@@ -22,14 +22,16 @@ public void RunTests(IEnumerable<string> sources, IRunContext runContext, IFrame
2222 {
2323 //Debugger.Launch();
2424
25- foreach ( string currentAsssembly in sources )
25+ frameworkHandle . SendMessage ( TestMessageLevel . Informational , Strings . EXECUTOR_STARTING ) ;
26+
27+ Settings settings = GetSettings ( runContext ) ;
28+
29+ foreach ( string currentAsssembly in sources . Distinct ( ) )
2630 {
2731 try
2832 {
2933 frameworkHandle . SendMessage ( TestMessageLevel . Informational , String . Format ( Strings . EXECUTOR_EXECUTINGIN , currentAsssembly ) ) ;
3034
31- Settings settings = GetSettings ( runContext ) ;
32-
3335 this . executor . RunAssembly ( currentAsssembly , settings , uri , frameworkHandle ) ;
3436 }
3537 catch ( Exception ex )
@@ -50,13 +52,13 @@ public void RunTests(IEnumerable<TestCase> tests, IRunContext runContext, IFrame
5052
5153 int executedSpecCount = 0 ;
5254
55+ Settings settings = GetSettings ( runContext ) ;
56+
5357 string currentAsssembly = string . Empty ;
5458 try
5559 {
56- Settings settings = GetSettings ( runContext ) ;
5760
58- IEnumerable < IGrouping < string , TestCase > > groupByAssembly = tests . GroupBy ( x => x . Source ) ;
59- foreach ( IGrouping < string , TestCase > grouping in groupByAssembly ) {
61+ foreach ( IGrouping < string , TestCase > grouping in tests . GroupBy ( x => x . Source ) ) {
6062 currentAsssembly = grouping . Key ;
6163 frameworkHandle . SendMessage ( TestMessageLevel . Informational , string . Format ( Strings . EXECUTOR_EXECUTINGIN , currentAsssembly ) ) ;
6264
@@ -66,7 +68,7 @@ public void RunTests(IEnumerable<TestCase> tests, IRunContext runContext, IFrame
6668 executedSpecCount += grouping . Count ( ) ;
6769 }
6870
69- frameworkHandle . SendMessage ( TestMessageLevel . Informational , String . Format ( Strings . EXECUTOR_COMPLETE , executedSpecCount , groupByAssembly . Count ( ) ) ) ;
71+ frameworkHandle . SendMessage ( TestMessageLevel . Informational , String . Format ( Strings . EXECUTOR_COMPLETE , executedSpecCount , tests . GroupBy ( x => x . Source ) . Count ( ) ) ) ;
7072 } catch ( Exception ex )
7173 {
7274 frameworkHandle . SendMessage ( TestMessageLevel . Error , string . Format ( Strings . EXECUTOR_ERROR , currentAsssembly , ex . Message ) ) ;
0 commit comments