Windows Phone Unit Test App associated with won't work - c#

You cannot vote on your own post
0
Hello Everyone,
note: this has been posted on the Windows Phone MSND forum on which I
was adviced to ask the same question on the Live Connect SDK
forums...that are now on stackoverflow.
I'd like to use some Unit Tests to automatically verfiy my usage of the Live SDK to access One Drive.
It seams that for the LiveSDK to be able to connect to the services the app has to be associated to the store.
For the record I'm using Visual Studio 2013 and I'm working on a Windows Phone 8.1 application.
Unfortunately a Windows Phone Unit Test App that has been associated to the store does not seem to work. This is what I see in the Visual Studio output:
========== Discover test finished: 1 found (0:00:00,4120231) ==========
------ Run test started ------
Deploying to Phone Internal Storage...
Creating a new clean layout...
Copying files: Total <1 mb to layout...
Registering the application to run from layout...
Deployment complete (2666ms). Full package name: "MyTestApp_1.1.0.0_x86__v05mkgjvmsq4a"
The application is not installed.
========== Run test finished: 0 run (0:00:03,3748925) ==========
Has someone already managed to use the LiveSDK within unit tests? If yes, would you please so kind to share how you achieved that?
Any piece of idea to get that working will be appreciated !
Many thanks in advance,
Bruno

Why do you want to unit test a foreign SDK? You should mock the SDK and verify that you call if correctly and react correctly for predefined results.
My goal is here not to test the Live Connect SDK but my usage of it. And by usage I mean the real one not against a mock: I'd like to verify that my code works well with the real SDK.
Of course to actually test my own classes I do have a mock of the SDK.

I had this issue but it had nothing to do with the Live SDK (as I'm not using it).
Ultimately I added a new Unit Test (Windows Phone 8.1) project, and brought all my tests over to it, removing the old one. I couldn't figure out how to fix it otherwise.

Why do you want to unit test a foreign SDK? You should mock the SDK and verify that you call if correctly and react correctly for predefined results.
I guess you are also not testing the other Microsoft Phone SDKs :-)

Related

Using Certification Test Tool for Windows Server 2016/9

Unlike the test tool for Windows 10, which is part of the Windows 10 SDK, Microsoft went out of their way to make the certification tool for Windows Server 2016 complicated.
I installed my test application and specified the path to the Inno Setup installer, off the Downloads folder, and specified the location of the binary files, namely the Program Files location, and the screen shown, I specified the process name, basically the executable file name. At least System Internal's Process Monitor utility said that was the name.
As you can see, I got thrown an error.
Log Time: 12/04/2018 08:57:21
MethodName:: ApplicationRunningViewModel.VerifyApplication
Message:
No running application's process found after your application installation.
==================================================================
Log Time: 12/04/2018 08:57:58
MethodName:: ApplicationRunningViewModel.VerifyAppProcess
Message:
Process not found in snapshot file.
==================================================================
How do I resolve the error? Basically, how is the steps to use this test tool?
Background:
I had previously certified my application for Windows 10 in the Windows Platform Ready / Winqual area of Microsoft and obtained the Microsoft Gold Application Development competency.
I was expecting to simply pay the yearly extortion fee, $5400, when I logged into the portal, saw the new redesigned Partner Center, and went to the Competency Summary section, where I saw the message that I am in danger to lose the competency. Microsoft apparently did away application certification based competencies for Application Development. Talking to MS external support, I was told what I already saw on my own that the Silver ISV is the only path forward testing against Windows Server 2016. My attempts to talk to a real Microsoft employee or find a real solution failed miserably. I think talking to Google is easier. I hope that MS straightens things out for next year. By the way, the Platform Ready / WinQual area disappeared as well as all certifications.
That brings me to my question. I am trying to use the Windows Server 2016 test tool (2019 was not available last week for download, hence 2016).
I already installed the application. It works fine on Windows Server 2016, just Microsoft did not make application verification easy.
How do I resolve this error? What piece of information does it want and how do I obtain it?
I found the same error while testing my application using the Certification Test Tool 1.0 for Windows Server for Windows Server 2019.
I just changed the sequence of the test. I did launch the tool and then installed my application. If you cancel the test your application must be reinstalled in order for the test tool to recognize your process. Everything worked as expected
I got another error while using the Certification Test Tool Preview for Windows Server 2016. He couldn't validate my signed assemblies because the tool verify the aseemblies signature usign the signtool.exe instead of sn.exe. If you signed your assemblies using the sn.exe, neither of the test tools for Windows server 2016 & 2019 will validate your signed assemblies. I had to check the log file generated by the test tool and sign the assemblies manually using the signtool.exe.
I hope this information help someone havign the same issues.
Greetings

store test kit do not appear in my Project menu

I am testing Windows Phone App 8.1 with Visual Studio 2013. I found out that the option Store Test Kit does not appear in the menĂº.
I have download a code example from https://channel9.msdn.com/Series/Windows-Phone-8-Development-for-Absolute-Beginners/Part-23-Testing-and-Submitting-to-the-Store and it appear in that example.
What i am missing? I need to register my App?
Thanks.
The video was done with vs2012, which has that nice Store Test interface with drag and drop features. I don't think that is available in vs2013 ultimate (the version that I am using). However, Run Project > Store > Launch Windows Phone App Certification Test.
NB: You may not run the test if you have not yet installed the certification kit, which is available here: https://dev.windows.com/en-us/develop/app-certification-kit
If the test succeeds you can go ahead and publish the app.
If it fails then you will get a nice report telling you exactly why it failed. You will then need to sort them out manually one at a time. Build your application every time after correction and run the test until it succeeds.
That is what I did.

install UCMA 3.0 and create a trusted application pool

I am following the tutorial
.As explained in the tutorial, I have installed UCMA 3.0 SDK
Next is, I ran Run Bootstrapper.exe /BootstrapLocalMgmt /MinCache successfully.
In the third step, I am trying to run the command Run Get-CsSite to get the SiteId, but I am getting an error as:
"Cannot find information about the local domain".
I am not sure about this error. Can somebody help me out with this. I am doing this on an azure machine.
Assuming that your machine is correctly joined to the domain, and meets the other pre-requisites:
You may be missing the configuration store, or the Lync components installation didn't succeed or didn't perform all needed setup properly.
I'd suggest to run the Lync 2010 setup (UI) on that machine, in order to have it joining the Lync farm properly (I use to do in this way), and get the configuration store as well.
My suggestion is to perform Step 3 and 4 from the following article:
http://lyncinsider.com/conferencing/how-to-add-new-servers-to-lync-20-tasks-every-lync-administrator-must-know/

Can't run unit tests on smart device emulator

I'm running Visual Studio 2008 and have a C# program that runs beautifully on the "Pocket PC 2003 Second Edition" emulator. However, when I try to run any unit tests I get an error on the first test:
The test adapter ('Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter,
Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter, Version=9.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a') required to execute this test could not be loaded.
Check that the test adapter is installed properly.
ActiveSync bootstrap initialization failed.
Please connect/cradle a real device or download the User-level Windows Mobile Device Center Application
from http://go.microsoft.com/fwlink?linkid=67763
Comparing the properties for the unit test and the application:
Conditional compilation symbols are identical
Platform target is identical ("Any CPU")
Framework Version is identical (v3.5)
Platform is identical ("Windows CE")
Output file folder is identical
Both have "Display the latest version of the .NET Compact Framework" checked
Output type for the application is "Windows Application", for the unit test is "Class Library" but it seems like that's what it wants.
The error message seems to indicate the VS2008 can't connect to the emulator, but since the program is running I know that isn't the case. Can I not run unit tests on an emulator?
Or am I missing files? Is there something I need to install, in order to perform unit tests? Nowhere on my system do I have a file named Microsoft.VisualStudio.TestTools.TestTypes*.*.
The problem was in the SmartDeviceTestRun.testrunConfig file, it was set to run on the actual device instead of the emulator. This web site was helpful:
https://msdn.microsoft.com/en-us/library/bb384146%28v=vs.90%29.aspx

Testing Windows Store Application on other machines

I want to test my windows 8 metro application on others PC such as my MS Surface or my friend's PC. but when I run it, I get following error:
This application can only run in the context of an AppContainer.
i searched a lot and found this but this topic for 2011 and VS 2011, so the solution does not work anymore.
please advice me.
The solution from the referenced thread should still work, especially point 2.
Right-clicking the project and choosing "Store"->"Create App Package..." (deselect uploading to the store) will create a folder with a package for your app and the dependencies.
In the same folder there is a PowerShell script. When run, it will probably ask you to change your ExecutionPolicy the first time, but then it will install the app just like a regular app that was installed from the store.

Categories

Resources