Posts

Showing posts from 2017

MTM and Coded UI Test Context parameters

The test context parameters related to tfs/tcm ( test case management) are available only if the tests are executed in the context of tfs server. This essentially means that the parameters are available only when the run is initiated from MTM and are not available when the run is initiated from VS The full list of test context parameters are            "__Tfs_TestRunId__"             "__Tfs_TestPlanId__"             "__Tfs_TestCaseId__"             "__Tfs_TestResultId__"             "__Tfs_TestIterationId__"             "__Tfs_TestConfigurationId__"             "__Tfs_TestConfigurationName...

How to get parameters from microsoft test manager to Coded UI

How to get parameters from Microsoft test manager (TestPlan/TestCase)  to Coded UI To get "parameter"  directly from a  testcases.in Coded UI. [TestCategory("CodedUITest"), DataSource("Microsoft.VisualStudio.TestTools.DataSource.TestCase", "Server_Path;TestPlanName", "TestCaseID",DataAccessMethod.Sequential), TestMethod] Public void CodedUITest {   //Do test Stuff   String parameter = TestContext.DataRow["parameter"]; } Source : - how-to-get-parameters-from-microsoft-test-manager-to-coded-ui

C# Delegates,Action,Func,Lamdas

In this blog, we will discuss Action delegate, Func delegate, and Lamdas. Let's start with a definition of delegate. Delegate: A delegate is a type that safely encapsulates a method, similar to a function pointer in C++.C# delegates are object-oriented, type-safe and secure. The type of delegate is defined by the name of the delegate. Action Delegate: - Action(Of T) delegate to pass a method as a parameter without explicitly declaring a custom delegate.We don't need to declare a delegate. The compiler is smart enough to figure out the proper types. The limitation is that corresponding method action must not return a value. Example to display Fahrenheit and Celsius using Action :-  public static void Main(string[] args) {            Action displayFarenheit = delegate(double celsius)             {                 Console.WriteLine((celsius * 9.0/5.0 ) + 32.0); ...

End to end testing using Protractor .net for Angular application

I really liked .net port (C#) of protractor which is built on top of selenium webdriver for angular based application . Source : https://github.com/bbaia/protractor-net