AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
DAX
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 01.04.2020, 00:24   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
sinedax: RSAT and Selenium in action - Dynamics 365 for Finance & Operations Regression Test
Источник: http://sinedax.blogspot.com/2020/03/...-dynamics.html
==============


Hi guys,


As you know, in order to handle the Regression Test in F&O we can use RSAT.


Here a couple of links:




One of the RSAT limit is the integration part, so you cannot use Task Recorder in order to recorder steps outside F&O.


The trick here is to use RSAT in combination with Selenium, https://www.selenium.dev/


Below the steps:


Generate the Recording of the Web application integrated to F&O through Selenium:



























Create the Recording:
















Export\Convert the Recording in a C# unit test file:





























































































The CS file will be looks like this:


// Generated by Selenium IDE
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Remote;
using OpenQA.Selenium.Support.UI;
using OpenQA.Selenium.Interactions;
using NUnit.Framework;


[TestFixture]
public class TEstTest {
private IWebDriver driver;
public IDictionary vars {get; private set;}
private IJavaScriptExecutor js;
[SetUp]
public void SetUp() {
driver = new ChromeDriver();
js = (IJavaScriptExecutor)driver;
vars = new Dictionary();
}
[TearDown]
protected void TearDown() {
driver.Quit();
}
[Test]
public void Test() {
// Test name: Test
// Step # | name | target | value
// 1 | open | /portale/web/guest |
driver.Navigate().GoToUrl("https://www.xxxxxxx.it");
// 2 | setWindowSize | 1294x734 |
driver.Manage().Window.Size = new System.Drawing.Size(1294, 734);
// 3 | click
driver.FindElement(By.LinkText("XXXXX")).Click();
// 4 | click | css=p:nth-child(3) > a |
driver.FindElement(By.CssSelector("p:nth-child(3) > a")).Click();
// 5 | close | |
driver.Close();
}
}



That said, will be enough to create an .NET C# class library with the above code.


Lastly, from X++, create a custom Menu in order to run from F&O the Selenium recording.
In order to achieve that, it's simple to create a custom project that reference the C# Library create before and call the "Selenium code".


Finally, with Task Recorder, walk through the custom menù in order to simulate the External Application like Customer Engagement, Transportation Management System, PLM, etc.


Conclusion

In this way we will have an unique Console in order to handle our Regression Tests between Microsoft Dynamics 365 F&O and other external applications and so avoid to use different products or manual interactions.


Till soon!


































Источник: http://sinedax.blogspot.com/2020/03/...-dynamics.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 00:01.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.