git 2 test

Nov 4, 2013 at 2:25 PM
I don't pretend to understand all the Key / Certificate stuff but...

I cloned the repo, fired up VS 2013 on Win 8.1 successfully built... 'yea'..

THEN being all agile minded... I hit Test Explorer and 'poo'...
Certificate file 'TemporaryKey.pfx' not found.
The cer.. is not valid for signing... blah blah...

Spent the next few days going through lots of http://channel9.msdn.com/search? and running through blogs... learned a lot, but nothing that gave me insight to the darn cert thing...

And I've ran into this multiple times... so I know I don't 'get it'...

Funny thing about this is it's just:
AdventureWorks.Shopper.Tests
AdventureWorks.UILogic.Test
that were failing... I attempted to 'refresh my Windows Store dev key' this am and now the 'other' tests do not pass:
AdventureWorks.WebServices.Tests
Microsoft.Practices.Prism.PubSubEvents.Tests
Microsoft.Practices.Prism.StoreApps.Tests
Which WERE running...

SO... this FEELS like something super simple that I'm messing in my setup... but at this point it's pissing me off SO MUCH I want to say 'screw it all' and 'f the MS store crap' all together...

Please help as I really want to establish these patterns in the new project we are starting, but test is critical and right now I would say 'I can't get to a Windows Store UX in a way I can rely on, so screw it... we build only HTML5 and support only platforms that have a solid webdriver remote access story for native applications'...

PLEASE make me feel like an idiot FAST... Thanks in advance.
Editor
Nov 4, 2013 at 5:05 PM
Hi,

Thanks for reporting this.

This doesn't seem to be an issue with your setup, but with the latest drop.
I just downloaded the latest source code available from the Source Code section and I could reproduce the issue you are mentioning with the tests (it seems that the rest of the library can be used without problems.)
Also, it seems that this problem was not present in previous drops or in the released version for Windows 8.0.

The development team had been notified of this so I believe this would be fixed in future drops.

Thanks,

Damian Cherubini
http://blogs.southworks.net/dcherubini
Nov 4, 2013 at 5:32 PM
cool... I'm not a BIG Idiot... ;-) I still don't get how the key stuff works and how I would go about 'finding / debugging' this... I've been through some of the tutorials, and I have made the key stuff work... but still don't have a grasp that gives me the confidence I would require to take this into a secure location (ie get locked in a room and have to make it work 'isolated'. Plus I keep having issues remote attaching to the UI for AutoUI testing. What this really pointed out to me also to question how REALLY I should attempt to do UI Automated testing. The reason I sort of jumped away from HTML5 and back into C# was the CodedUI test hooks seem to be the only way to go for Windows Store apps right now as the tool chain does not support webdriver or WinJS... anyway... I'll go try with the Windows 8

thanks...
Coordinator
Nov 4, 2013 at 9:19 PM
I'm tracking down this issue. Are you able to run any tests? I'm guessing that 95 of the unit tests are passing. These are the AdventureWorks.WebService and Prism unit tests. The AdventureWorks.Shopper.Tests and AdventureWorks.UILogic.Tests are having issues I believe are related to this bug:

https://connect.microsoft.com/VisualStudio/feedback/details/790477/winrt-mstest-runner-fails-when-using-ilist-t-properties-of-custom-types-from-xaml

I'm hunting this down, but can confirm that you are able to get 95 tests to pass?

BTW: You can get the warning regarding TemporaryKey.pfx to go away if you remove the reference in the csproj files. I don't think this is related to your ability to run unit tests though.

Thanks,
-Francis
Nov 5, 2013 at 1:31 PM
Sorry, should have checked in (instead I was watching the Packers get beat... when I could have been get'n beat by code ;-)... ANYWAY...

Yes... I got some to run (95 seems right, I know is was in the 90's which is why I didn't notice the ones not passing... they didn't really error, it gave the info icon probably the warning).

I'll go do the following then post back:

1 - Re-run to confirm 95 tests pass.
2 - Remove reference in the csproj files and re-run
3 - Re-run but use the Windows 8.0 source

I 'assumed' you guys are doing this all 'SCRUM' y... would it be possible to expose the SCRUM site ? ( my big goal here is to set up a process that allows exposes my team to newer patterns of development as we are planning a significant infrastructure refresh ). Given my assumption I figure this project was maybe running TFS tools, maybe even out of visualstudio.com. I also assumed you had some sort of CI going... I picked the Windows 8 Prism project to 'pattern' after as I want to establish a bit more 'opinionated' sustainable pattern first.... Anyway... I think letting 'us mortals' peak into actual working SCRUM message traffic would be very cool...

ok.... I'll quit yak'n and get the feedback you asked for... thanks
Nov 5, 2013 at 3:03 PM
OK... I'm writing this post AS I do this.

1 - Re-run to confirm 95 tests pass.

Open VS 2013 RC on CAT8DEV (Win8.1)
Open AventureWorksShopper.sln Project (C:\Users\CAT\Source\Repos\prismwindowsruntime\8.1)
Test Explorer does it's green bar thing... when done, all test are ! (Not Run)
Click Run All
Get 1 Error and 9 Warnings
95 Tests Passed

Warning 1 The event 'Microsoft.Practices.Prism.StoreApps.Tests.Mocks.MockModelWithValidation.PropertyChanged' is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.1\Prism.StoreApps.Tests\Mocks\MockModelWithValidation.cs 49 50 Microsoft.Practices.Prism.StoreApps.Tests
Warning 2 Certificate file 'TemporaryKey.pfx' not found. Microsoft.Practices.Prism.StoreApps.Tests
Warning 3 The certificate specified is not valid for signing. For more information about valid certificates, see http://go.microsoft.com/fwlink/?LinkID=241478. Microsoft.Practices.Prism.StoreApps.Tests
Warning 4 The field 'AdventureWorks.UILogic.Tests.Mocks.MockSessionStateService._knownTypes' is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.1\ReferenceImplementation\AdventureWorks.UILogic.Tests\Mocks\MockSessionStateService.cs 17 28 AdventureWorks.UILogic.Tests
Warning 5 The event 'AdventureWorks.UILogic.Tests.Mocks.MockPaymentMethodPageViewModel.PropertyChanged' is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.1\ReferenceImplementation\AdventureWorks.UILogic.Tests\Mocks\MockPaymentMethodPageViewModel.cs 58 50 AdventureWorks.UILogic.Tests
Warning 6 The event 'AdventureWorks.UILogic.Tests.Mocks.MockShippingAddressPageViewModel.PropertyChanged' is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.1\ReferenceImplementation\AdventureWorks.UILogic.Tests\Mocks\MockShippingAddressPageViewModel.cs 60 50 AdventureWorks.UILogic.Tests
Warning 7 The event 'AdventureWorks.UILogic.Tests.Mocks.MockBillingAddressPageViewModel.PropertyChanged' is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.1\ReferenceImplementation\AdventureWorks.UILogic.Tests\Mocks\MockBillingAddressPageViewModel.cs 73 72 AdventureWorks.UILogic.Tests
Warning 8 The variable 'alertMessageServiceCalled' is assigned but its value is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.1\ReferenceImplementation\AdventureWorks.UILogic.Tests\Repositories\ShoppingCartRepositoryFixture.cs 120 18 AdventureWorks.UILogic.Tests
Warning 9 The variable 'signInUserControlOnNavigatedToCalled' is assigned but its value is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.1\ReferenceImplementation\AdventureWorks.UILogic.Tests\ViewModels\ShoppingCartPageViewModelFixture.cs 138 18 AdventureWorks.UILogic.Tests
Error 10 Error : DEP3000 : Attempts to stop the application failed. This may cause the deployment to fail. App Packages may only be shutdown as part of a Visual Studio build operation. AdventureWorks.UILogic.Tests
NOTE: I had been attempting to 'fix' manifest in this one by changing the Packaging Certificate to my developer ID

2 - Remove reference in the csproj files and re-run

In files
1- AdventureWorks.UILogic.csproj
2- Microsoft.Practices.Prism.StoreApps.Test.csproj
3- Microsoft.Practices.Prism.StoreApps.csproj
<!-- CATHACK: BEGIN <PackageCertificateKeyFile>TemporaryKey.pfx</PackageCertificateKeyFile> CATHACK: END --> Open VS 2013 RC and rerun test, and yes... No warning regarding TemporaryKey.pfx... thanks...

3 - Re-run but use the Windows 8.0 source

Open AventureWorksShopper.sln Project (C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0)

Warning: Functional changes required
Functional changes required
Visual Studio will automatically make functional changes to the following projects in order to open them. The project behavior will change as a result. You will be able to open these projects in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1.
 - Microsoft.Practices.Prism.PubSubEvents, "C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\Prism.PubSubEvents\Microsoft.Practices.Prism.PubSubEvents.csproj"

Non-functional changes required
Visual Studio will automatically make non-functional changes to the following projects in order to enable them to open in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1. Project behavior will not be impacted.
 - AdventureWorksShopper, "C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\AdventureWorksShopper.sln"

No changes required
These projects can be opened in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without changing them.
 - AdventureWorks.Shopper, "C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\ReferenceImplementation\AdventureWorks.Shopper\AdventureWorks.Shopper.csproj"
 - Tests, "Tests"
 - AdventureWorks.Shopper.Tests, "C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\ReferenceImplementation\AdventureWorks.Shopper.Tests\AdventureWorks.Shopper.Tests.csproj"
 - AdventureWorks.WebServices, "C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\ReferenceImplementation\AdventureWorks.WebServices\AdventureWorks.WebServices.csproj"
 - AdventureWorks.UILogic, "C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\ReferenceImplementation\AdventureWorks.UILogic\AdventureWorks.UILogic.csproj"
 - AdventureWorks.UILogic.Tests, "C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\ReferenceImplementation\AdventureWorks.UILogic.Tests\AdventureWorks.UILogic.Tests.csproj"
 - .nuget, ".nuget"
 - Microsoft.Practices.Prism.StoreApps, "C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\Prism.StoreApps\Microsoft.Practices.Prism.StoreApps.csproj"
 - AdventureWorks.WebServices.Tests, "C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\ReferenceImplementation\AdventureWorks.WebServices.Tests\AdventureWorks.WebServices.Tests.csproj"
 - Microsoft.Practices.Prism.StoreApps.Tests, "C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\Prism.StoreApps.Tests\Microsoft.Practices.Prism.StoreApps.Tests.csproj"
 - Microsoft.Practices.Prism.PubSubEvents.Tests, "C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\Prism.PubSubEvents.Tests\Microsoft.Practices.Prism.PubSubEvents.Tests.csproj"
Then got an upgrade log:
C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\UpgradeLog.htm

Clicked "RunAll" in Test Explorer
192 Tests Passed
1 Error 11 Warnings

Warning 1 XML comment on 'Microsoft.Practices.Prism.PubSubEvents.DispatcherEventSubscription<TPayload>' has cref attribute 'Dispatcher' that could not be resolved C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\Prism.PubSubEvents\DispatcherEventSubscription.cs 16 34 Microsoft.Practices.Prism.PubSubEvents
Warning 2 XML comment on 'Microsoft.Practices.Prism.PubSubEvents.IEventSubscription.SubscriptionToken' has cref attribute 'Events.SubscriptionToken' that could not be resolved C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\Prism.PubSubEvents\IEventSubscription.cs 19 39 Microsoft.Practices.Prism.PubSubEvents
Warning 3 XML comment on 'Microsoft.Practices.Prism.PubSubEvents.DispatcherEventSubscription<TPayload>.InvokeAction(System.Action<TPayload>, TPayload)' has cref attribute 'Dispatcher' that could not be resolved C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\Prism.PubSubEvents\DispatcherEventSubscription.cs 39 116 Microsoft.Practices.Prism.PubSubEvents
Warning 4 XML comment on 'Microsoft.Practices.Prism.PubSubEvents.EventSubscription<TPayload>.SubscriptionToken' has cref attribute 'Events.SubscriptionToken' that could not be resolved C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\Prism.PubSubEvents\EventSubscription.cs 68 39 Microsoft.Practices.Prism.PubSubEvents
Warning 5 The event 'Microsoft.Practices.Prism.StoreApps.Tests.Mocks.MockModelWithValidation.PropertyChanged' is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\Prism.StoreApps.Tests\Mocks\MockModelWithValidation.cs 49 50 Microsoft.Practices.Prism.StoreApps.Tests
Warning 6 The field 'AdventureWorks.UILogic.Tests.Mocks.MockSessionStateService._knownTypes' is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\ReferenceImplementation\AdventureWorks.UILogic.Tests\Mocks\MockSessionStateService.cs 17 28 AdventureWorks.UILogic.Tests
Warning 7 The event 'AdventureWorks.UILogic.Tests.Mocks.MockPaymentMethodPageViewModel.PropertyChanged' is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\ReferenceImplementation\AdventureWorks.UILogic.Tests\Mocks\MockPaymentMethodPageViewModel.cs 58 50 AdventureWorks.UILogic.Tests
Warning 8 The event 'AdventureWorks.UILogic.Tests.Mocks.MockShippingAddressPageViewModel.PropertyChanged' is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\ReferenceImplementation\AdventureWorks.UILogic.Tests\Mocks\MockShippingAddressPageViewModel.cs 60 50 AdventureWorks.UILogic.Tests
Warning 9 The event 'AdventureWorks.UILogic.Tests.Mocks.MockBillingAddressPageViewModel.PropertyChanged' is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\ReferenceImplementation\AdventureWorks.UILogic.Tests\Mocks\MockBillingAddressPageViewModel.cs 73 72 AdventureWorks.UILogic.Tests
Warning 10 The variable 'alertMessageServiceCalled' is assigned but its value is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\ReferenceImplementation\AdventureWorks.UILogic.Tests\Repositories\ShoppingCartRepositoryFixture.cs 120 18 AdventureWorks.UILogic.Tests
Warning 11 The variable 'signInUserControlOnNavigatedToCalled' is assigned but its value is never used C:\Users\CAT\Source\Repos\prismwindowsruntime\8.0\ReferenceImplementation\AdventureWorks.UILogic.Tests\ViewModels\ShoppingCartPageViewModelFixture.cs 138 18 AdventureWorks.UILogic.Tests

Error 12 Error : DEP3000 : Attempts to stop the application failed. This may cause the deployment to fail. App Packages may only be shutdown as part of a Visual Studio build operation. AdventureWorks.UILogic.Tests

That's it...
Coordinator
Nov 5, 2013 at 7:19 PM
I found the issue. For some reason, there are a few things in the AdventureWorks.Shopper project that are causing problems for the AdventureWorks.Shopper.Tests as well as the AdventureWorks.UILogic.Tests.

Issue #1: IncrementalUpdateBehavior declared in DataTemplates.xaml:
App.xaml loads DataTemplates.xaml into a resource dictionary but for some strange reason, our addition of the IncrementalUpdateBehavior into the ProductTemplate and ProductTemplateMinimal is causing issues for the WinRT test runner.

Issue #2: IsSignInInvalidConverter declared in App.xaml:
From what I can tell, I don't think the WinRT test runner likes the IsSignInInvalidConverter. Perhaps because the converter's use of ResourceLoader.

Possible solution:
I've moved the Behaviors folder from the AdventureWorks.Shopper project to the AdventureWorks.UILogic project. The unit tests moved accordingly. I'm going to avoid testing against a Windows Store App project. Instead, any logic I want to test will live in a Windows Store class library or in a PCL.

Christrees: Thanks for bringing this issue up. I needed to get the bottom of the unit test issues in 8.1.

Also, unfortunately we don't have the CI build up yet since my build server doesn't understand how to build VS2013 projects yet.

I'll push out a new drop soon.
-Francis
Nov 6, 2013 at 9:12 PM
Thanks!

This is just a general pondering, but why I was attempting to jump into all the 'new' VS 2013, Win8.1, Prism... motivated by:
http://channel9.msdn.com/Events/Build/2013/3-323

Does anyone have a suggestion on UI hooks? From my understanding most the industry is using webdriver to hood to the accessibility standards

http://www.w3.org/standards/webdesign/accessibility
http://www.w3.org/TR/2013/WD-webdriver-20130117/

sort of makes sense to me, which is why I was heading down this path with Prism pattern... eventually was wanting to hook that up to something akin to SpecFlow... all of which I think were 'well baked' ideas... just maybe I'm reaching too much???

Or... where should I be looking ?