Is there a reusable TFS query picker for Windows applications? - winforms

Given a WinForms application, a user needs to select a TFS query.
I know how to get the list of queries through the API and that I could create a treeview-based form from scratch.
The TFS-Addin for Excel has a form to select a query:
The TeamProjectPicker can be reused in custom .NET applications, I am curious if something similar exists for the Query picker.
Version info:
TFS 2017 Update 1
WinForms application with .NET 4.6.1

There is a TeamProjectPicker Class, so we can use the TeamProjectPicker directly.
But cannot find any QueryPicker related classes from Microsoft.TeamFoundation.Client Namespace.
So, seems it's not reusable, you may have to get the list of queries through the API.
See WorkItemStore.Query Method for details.
You can reference below samples:
Working With Queries
App-TFSPicker

Related

Coded-UI Auto Generate UIMap

I have been looking into using MS Coded-UI as part of a new testing initative. We have exisitng UI automation using the HP stack QC/QTP but have found this to be very heavy weight and error prone, and as a result are looking to coded-ui in a bit to move our automation stack closer to the dev stack.
I am testing a wpf application running on windows 7 desktop, primarily on .net 4.5.
I have 2 questions.
Is it possible to auto generate the UIMap? Could i use a top level UITestControl object, find this and iterate over to generate a map of all subsequent children?
As part of continuous integration, is it possible to look coded-ui tests into a TFS build cycle? I am using visual studio 2012 ultimate but only 2010 instance of TFS. I assume these really all need to be in sync in order to pull this off correctly?
Regarding your first question, you can create Coded UI tests manually by recording your actions through Visual Studio or by using an existing action recording from Microsoft Test Manager.
Since a Coded UI tests is just plain code (C# or VB) you an easily edit it and add extra control logic.
Regarding your second question, it's absolutely possible to run your Coded UI tests as a part of your continuous integration build.
You have a couple of options:
Run your Coded UI tests on your Build Server. If you configure your Build Agent for Interactive use, you can let it run Coded UI tests. This is not my favorite option.
Use Lab Management with virtual environments (requires Hyper-V and System Center Virtual Machine Manager) or with Standard Environments. By using Lab Management you can automatically deploy to test machines and execute Coded UI tests on them.
Use Release Management in combination with Microsoft Test Management. This allows you to setup continuous deployment and run Coded UI tests on your target servers.
Lab Management with Standard Environments is the easiest to get started with, especially since you have an Ultimate license which includes Microsoft Test Manager.
Release Management is new and added to TFS 2013 for deploying to machines from test to production. It's a very nice solution but it currently doesn't integrate with Lab Management.
First question: there is not functionality to discover all children of some top-level parent control. But you can start Coded UI Builder, star recording and click or interact in another way with all controls you are interested in(it takes like a minute even for a window with a lot of children controls). That click Generate, name method like Dummy or whatever. All controls will be added to UI Map, and you can change search properties, names etc.
Second question:
It is possible to set up continuous integration flow including Coded UI tests - build, deploy, test.
Create new Build definition, use LabDefaultTemplate.xaml template for it.

Will this architecture be effective for a dashboard that is cross platform/browser compatible?

I am researching architecture for a dashboard for my company to eliminate the clunky reporting UI we have now that has a treeview menu and uses the SQL Reporting Services Report Viewer control.
I am considering using ASP.NET MVC 4 server side and Telerik Kendo UI on the client side for the data tables, charts, and graphs. For data access, I would use ADOMD.NET to retrieve data from the SSAS cube.
Reasons for this is I am interested in something that is lightweight, fast, and that runs equally well on Android tablets, iPad's, in Firefox, Safari, and IE 9, iPhone's, Android phones, etc.
Will this be an effective architecture for a lightweight, cross platform compatible corporate dashboard? For a MSFT environment, are there better alternatives that meet my requirements?
I am working on a very similar project with ASP.NET MVC3/4 and Telerik Kendo UI.
Refer to this post concerning the easiest way of doing this, using a third-party Entity Framework provider. Technically this would mean that all you have to do is serializing the data source obtained from SSAS Entity Framework Provider to JSON then giving it to a Kendo UI control and you're in business.

Designing a data model in VS2010 and generating ORM code, application

Simply put: I have a database design in my head and I now want to use Visual Studio 2010 to create a WPF application. Key is to use the VS2010 tools to take much as possible manual work out of my hands.
The database engine is SQLite
ORM probably through DBLINQ
Use of LINQ
The application can create new, empty database instances
Easily maintainable (changes in data model possible)
Questions
How do I start designing the database model (visually) in Visual Studio 2010? Should this be an xsd? Do I do this in a separate project?
Next, how can I make the most use of VS2010 code generation tools to generate a Data Access Layer?
I suppose the Data Access Layer will be added as a Data Source (in another project?) and from there it's a rather generic data binding solution?
I tried finding clear examples of this but it's a jungle out there, the hunt for a solution is NOT converging to one clear method.
Update
So I decided to use ADO.NET entity framework, DBLINQ is out of the picture. I downloaded and installed the System.Data.SQLite ADO.NET provider which integrates with VS2010. From the VS2010 Server Explorer one can create and design a new database but it could be done with a standalone tool for SQLite as well. I then created a new WPF application project, and in the solution explorer added an ADO.NET Entity Data Model, which automatically generates an edmx with C# code (which is the Data Access Layer) from the already created database file. WAF (waf.codeplex.com) seems like a good idea to implement the rest but plain LINQ to SQL will do. This (click here) is also a very helpful question on stackoverflow.
Kay,
Please consider using ADO .NET Framework. It's supported by VS 2010 and LINQ (quick article).
There is one thing you must know before designing your architecture. BLL (Business Logic Layer) is a layer of logic specific for a particular data usage, hence cannot be generated automatically by (whatever you will use) framework. I guess you had Data Access Layer in mind - don't worry about that - if you're going to use ADO .NET and LINQ to Entities, DAL will be generated for you automatically. LINQ to Entities together with ADO .NET Framework are powerful set of tools which should 100% cover your needs. Additional info about LINQ to Entities.
Please feel free to ask if you have any questions.

SQL Reporting Services 2005 vs WPF Fixed Document Control

In my project i have used WPF and am following MVVM pattern. So i have a report module in my project and the reports are just plain reports. So i would like to know should i use SQL Reporting Service 2005 to create reports and then use report viewer as client or should i go for WPf Fixed Document Control- Document viewer.
Can anyone please tell me which of these will be easier to integrate with my project.
Please reply
Thanks
Sharath
WPF Document (Fixed or Flow)
Pros:
Easier to integrate. All is included in regular WPF
Native
More control on the output
Cons:
Must program a lot for a multi-page report
Must program a lot for headers, footes, groups, etc.
SQL Reporting Services
Pros:
Mature tools
Interoperable with other solutions (IE asp.net)
Groups, totals, page headers, graphics built in
Cons:
Not native, must use a embedded windows form control
Must deploy the reporting service runtime separately (not good for click-once apps)
Hard to integrate to your business objects

UI automation tool for a windows based WPF application with Record and Playback feauture

I am in the process of recommending an UI automation tool for a windows based WPF application in a company
Which targets wide range of customers . The Application lives on a layer of WCF services for getting
The data. The company is already having a small VBScript framework written specifically for Test Complete
and is really not robust, Hence I am lookout for a right tool, where we could reuse the scripts or
Improve the already existing tool. Any ideas are welcome.
I have looked at Microsoft UI Automation, Project White, UIA Verify and Ranorex. Each one of them
Is having a feature lack.
I was able to go through the process of Microsoft UI Automation. I am still in the process of understanding how it works
with WPF, since it is totally dependent on Automation IDS.
Our application is huge and is not written with this in mind. All the code either does not implement
Automation ID property or Name property which is very much essential for object identification in the visual tree
in tools like UISpy and VisualUIAVerify.
What I am looking in specific are the following. Please give ratings to each of these
1) Recording : Recording , play back and automatic execution of test scripts and generate a report.
2) Dependencies : Minimal Dependencies(.NET frameworks, API modules , SDK Versions etc..)
3) )Code Generation : Code Generation of test scripts from Templates, Macros and Recording.
4)Object Name Mapping: Avoid explicit usage of Automation IDS and screen corrdinates, if they use, does it support any tools which would take XAML Files and insert Automation IDS into it and also avoid Problems With duplicate Automation IDS.
5) Events: Any Events and call backs that the user(tester) may receive if the GUI has undergone any changes
and how the scripts would change in this Case.
6) Support : Support for different scripting languages and easy Code conversions(C#, VBScript, Python.. etc)
7) Fast and Reliable: Easy and fast accessibility of GUI elements for manipulation( Like support to xml dom, Json.. etc), navigation, code duplication replacement tasks for changes in UI and easy configuration(xml, ini files)
8)Code Converters: the tester writes code in vbscript and developer could simply convert it into c# for embedding them into any stand alone framework if need be).
9)Custom controls: Support for custom controls and object mapping. If you have a custom object that behaves like one of standard controls. are you able to map (tell the test tool that the custom control behaves like the standard) control? Does it support all the standard controls methods? Can you add the custom control to it’s own class of control?
10)Reports: Should be able to execute multiple tests at once and generate a report similar to VisualUIAVerify.
Visual Studio 2010 Coded UI Tests
You can use Visual Studio 2010 Ultimate or Visual Studio 2010 Premium to create automated tests of the user interface known as coded UI tests. These tests provide functional testing of the user interface and validation of user interface controls.
I am using Coded UI Tests to automate tests of a WPF application built on the MVVM pattern. The record/playback features of the tool are impressive, generating really nice models. For large suites, the advice is to tear apart the generated code, structuring and extending it for your own purposes.
I recommend Visual UIA Verify to assist viewing the automation structure of your application while developing and debugging.
Have you tried AutomatedQA testcomplete
http://www.automatedqa.com/products/testcomplete/

Resources