mobileapi + crm – using application related .xml files to build part of an automation framework
TRANSCRIPT
![Page 1: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/1.jpg)
MobileAPI + CRM – using application related .xml files to build part of an automation frameworkTSIMAFEI AVILIN
JANUARY 30, 2016
![Page 2: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/2.jpg)
• Tsimafei Avilin
• 9+ years in IT - 3 years in Functional Testing,
6+ years in Automation Testing
• Test automation optimization, Test automation frameworks, Test Automation strategy
• Test Automation, Test Frameworks, Resource Management, QTP, TestComplete, WebDriver, API testing, .NET Automation, etc.
ABOUT ME
![Page 3: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/3.jpg)
Problem statement
![Page 4: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/4.jpg)
4CONFIDENTIAL
General example of passing data
![Page 5: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/5.jpg)
5CONFIDENTIAL
CRM + Mobile example
CRM Mobile
• FetchXML is a proprietary query language that is used in Microsoft Dynamics CRM Online 2016 Update and Microsoft Dynamics CRM 2016 (on-premises). It’s based on a schema that describes the capabilities of the language. The FetchXML language supports similar query capabilities as query expressions. In addition, it’s used as a serialized form of query, used to save a query as a user-owned saved view in the userquery entity and as an organization-owned saved view in the savedquery entity. link
![Page 6: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/6.jpg)
6CONFIDENTIAL
Simple test scenario
TC: Get all companies• Login• Verify all companies passed from the server• Verify all companies have correct data
![Page 7: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/7.jpg)
7CONFIDENTIAL
Common scenario
![Page 8: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/8.jpg)
8CONFIDENTIAL
Getting actual and expected data in TAF
![Page 9: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/9.jpg)
9CONFIDENTIAL
Company object
Company object has many properties, how do you decide which properties to use to: - create fetchXML; - parse response; - Compare actual and expected data; - How to store properties?
DB
HTML (response from mobile API)
![Page 10: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/10.jpg)
10CONFIDENTIAL
What you gonna do?
![Page 11: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/11.jpg)
11CONFIDENTIAL
Approach #1 : Kick and Get (KAG)
Role 1 Role 2
![Page 12: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/12.jpg)
12CONFIDENTIAL
Approach #2 : Cry and Get (CAG)
Role 1 Role 2
![Page 13: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/13.jpg)
13CONFIDENTIAL
Approach# 3: Think and Get (TAG)
тельняшка?
![Page 14: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/14.jpg)
14CONFIDENTIAL
Application architecture
![Page 15: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/15.jpg)
15CONFIDENTIAL
ANALYZE VIEW AND…
![Page 16: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/16.jpg)
16CONFIDENTIAL
… OBJECT
![Page 17: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/17.jpg)
17CONFIDENTIAL
Reading xml files
Both MobileAdapter and TAF read xml files located on the server independently
![Page 18: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/18.jpg)
18CONFIDENTIAL
Get view and object data
Views xml files Entities xml files
![Page 19: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/19.jpg)
19CONFIDENTIAL
Using it in your TAF
public static string[] GetUniqueXRMPropertiesByListView(EntityType ID, string listview) { var controls = GetAllControls(listview); var ignoreprop = GetIgnoreInCRMQueryProperties(ID); var props = controls.Where(c => ignoreprop.Contains(c.Property) != true) .Select(c => c.Property) .Distinct() .ToArray();
return props; }
[DllImport("advapi32.DLL", SetLastError = true)] public static extern int LogonUser(string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, ref IntPtr phToken);
public void CreateRecentFile(XDocument xDoc, string fileName) { IntPtr admin_token = default(IntPtr); WindowsIdentity wid_current = WindowsIdentity.GetCurrent(); WindowsIdentity wid_admin = null; WindowsImpersonationContext wic = null; try {
![Page 20: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/20.jpg)
20CONFIDENTIAL
Workflow
![Page 21: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/21.jpg)
21CONFIDENTIAL
fetchXML files examples
You can check XML file contains information about• search• aggregate• filtering/sorting• whatever you have in xml to be under test…
![Page 22: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/22.jpg)
22CONFIDENTIAL
• NOT NEED TO THINK ABOUT PROPERTIES CHANGES
• SIMPLE PARSING OF XML FILES• SET OF PROPERTIES IS GENERATED
ON FLY
CONS PROS
PROS AND CONS
• DIFFICULT TO UNDERSTAND THIS APPROACH
• CROSS DOMAIN ISSUES• DO YOU HAVE SOMETHING TO
ADD?..
You even can control set of properties in xml file by creating kind of ‘template’ setAnd hence improve performance by removing unnecessary properties from dev. xml;
![Page 23: MobileAPI + CRM – using application related .xml files to build part of an automation framework](https://reader036.vdocuments.us/reader036/viewer/2022062523/58759d611a28ab6d198b5c49/html5/thumbnails/23.jpg)
23CONFIDENTIAL
Thank you for your attention!Questions?
Благодарствую-с за оказаные почести, судари и барышни!