VS 2013 CA0053 : Error Running Code Analysis

Friday, July 4, 2014

I have a lecture next week on performance and developers tools and I went to an old project (TicTacToe – Created in VS 2010 ) I’m using to demonstrate code analysis. I’ve open the project and ran Code Analysis, and I received the following error: CA0053    Error Running Code Analysis    CA0053 : Unable to load rule assembly 'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\fxcop\rules\globalizationrules.dll': Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.        (Global)      Right any I tested new project created in VS...

Windows Azure Storage Emulator – v3.0 – Installation failed

Tuesday, July 1, 2014

Today I faced a very annoying and strange issue while installing newer version of Azure Storage Emulator on my machine. Tried to remove almost everything related to Azure but still nothing worked…. Although I ran DsInit to work on SQLEXPRESS instead of localdb I decide to delete sql local db by running the following commands: sqllocaldb stop v11.0 sqllocaldb delete v11.0 sqllocaldb create v11.0” The result should be - “LocalDB instance "v11.0" created with version 11.0.” After recreating SQL local db Azure Storage Emnulator worked. Hope this helped.

Could not establish trust relationship for SSL/TLS secure channel

Thursday, June 26, 2014

Working with WebClient to fetch some data from a web service (HTTPS) return an error, now it’s fully understandable why this exception raised – the server certificate has expired and isn’t valid any more. But how I can still getting the data from the service although the certificate isn’t valid??? You just need to override the ServerCertificateValidationCallback property - Gets or sets the callback to validate a server certificate. System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; }; And you’re done!
no comments

העתקה של בדיקות ומבנה משרת לשרת

בתקופה האחרונה שואלים אותי יותר ויותר בנוגע להעברת בדיקות וכל מבנה העץ תחת MTM לשרת אחר או פרוייקט אחר. ב – 2010 שרק הגיע MTM לשוק כתבתי כלי לשכפול פנימי בתוך הפרויקט (במטרה לנהל גרסאות שונות של הבדיקות) - http://blogs.microsoft.co.il/shair/2011/03/20/test-case-migrator-between-projects-wpf-metro/. ב – 2012 מיקרוסופט הכריזה על יכולת חדשה ב – MTM – Clone המאפשרת שיכפול של כל עץ הבדיקות, אבל זה רק באותו הפרוייקט…. אז שוב מצאתי את עצמי כותב כלי לסייע במעבר –הורדה של הכלי (כולל קוד) 1. הקמתי פרוייקט ריק 2. נפתח את הכלי, נציין פרויקט מקור ופרוייקט מטרה. 3. לאחר מכן נבחר אילו ספריות ו\או בדיקות אנו מעוניינים להעביר.. 4. ניצור Test Plan...
no comments

How To: Run Tests On Different Machines In Parallel

Wednesday, June 18, 2014

I’m getting this question a lot, how to run multiple tests on different machines in parallel? Every customer that I work with has over 100 tests and some has more than 1000+. So how to improve test execution time? running 1000+ tests can take a while and we want to get the results as fast as possible. So, for Unit Tests there is a nice trick (Wrote about it in 2010 –>Run Unit Tests in Parallel using Visual Studio 2010) that allow you to run those tests in parallel on the same machine. But what about Coded UI Tests? you most know we...

Unit Test Error – ERROR [IM014] [Microsoft][ODBC Driver Manager]

Monday, April 28, 2014

Visiting a customer we faced a strange problem running Coded UI with Excel Data Source: The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" (http://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library. Error details: ERROR The specified DSN contains an architecture mismatch between the Driver and Application The same test works on Windows 7 machines but received this error on Windows 8 64bit, So I start to investigating… First if opened odbcad32 (from Run command), I’ve noticed the “Excel Files” DSN exists but...

Clear IIS Logs Using Task Scheduler

Wednesday, April 23, 2014

This is something I see a lot, IIS logs takes a lot of space and sometimes even cause the IIS Server to stop due to “Not Enough Space” exception. There is not a build in solution for Log retention policy but several options on File Size, Creation Scheduling etc. There are many solutions for cleaning the Logs but I prefer the Task Scheduler way with a single line for cleaning Logs based on their creation date. Run Task Scheduler from the Command Line Open a command prompt. To open a command prompt, click Start , click All Programs , click Accessories , and...
no comments

TFS API Part 54 – Add Associate Automation Programmatically

Monday, March 3, 2014

Microsoft Test Manager allows you to connect Test Automation to Manual Test, this is part of end to end solution, once you connect Automated Test to Manual Test you can use it in Lab Manager. You can link any unit test, coded UI test, or generic test to a test case. You’ll want to link a test method that performs the test described by the test case. Typically these are integration tests. The results of automated and manual tests appear together. If the test cases are linked to backlog items, stories, or other requirements, you can review the test results...
tags: , , ,
no comments

TFS API Part 52 – Getting Work Item History

Wednesday, October 30, 2013

Tweet Work Item History field isn’t just a Text field that shows all the changes in a specific work items, it’s a collection of Revision object. Each time you save a Work Item a new revision object is been create and represent the Work Item Latest values. You can use the History to get previous values from Fields, Links and Attachments history. In this post I’ll show how to get Work Item revision list and display the Fields of specific revision. Download Demo Project Step 1: Connecting To TFS And Getting Work Item Store private void btnConnect_Click(object sender, RoutedEventArgs e) { TeamProjectPicker tpp...

TFS API Part 51 – Adding Test Step & Shared Step

Monday, October 7, 2013

Working TFS API for Test Cases is different from Work Items, the usage is different and this cause many of customer to send me questions regarding Test Case API. This post will demonstrate how to create new Test Case, Adding Steps, Step Attachments, Shared Steps and more. As always we need to start with connecting TFS Object Model: TeamProjectPicker tpp = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, false); if (tpp.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; TfsTeamProjectCollection Tfs = tpp.SelectedTeamProjectCollection; For Work Items we need to obtain WorkItemStore object, but for Test Cases we need to work with ITestManagmentTeamProject object. ITestManagementServiceservice = (ITestManagementService)Tfs.GetService(typeof(ITestManagementService)); ITestManagementTeamProject TestProject = (ITestManagementTeamProject)service.GetTeamProject(tpp.SelectedProjects.Name); The ITestManagmentTeamProject contains many helpers for Test API TestPlans...