<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ashish Kumar Gupta on Medium]]></title>
        <description><![CDATA[Stories by Ashish Kumar Gupta on Medium]]></description>
        <link>https://medium.com/@ashishgu?source=rss-9d13d0d7ab3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*VMoankOMM0WznWega8E1Lg.jpeg</url>
            <title>Stories by Ashish Kumar Gupta on Medium</title>
            <link>https://medium.com/@ashishgu?source=rss-9d13d0d7ab3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 21:30:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ashishgu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Workfront Fusion: Automation Workflow to create leads in Marketo]]></title>
            <link>https://medium.com/@ashishgu/workfront-fusion-automation-workflow-to-create-leads-in-marketo-105a5479fb35?source=rss-9d13d0d7ab3------2</link>
            <guid isPermaLink="false">https://medium.com/p/105a5479fb35</guid>
            <category><![CDATA[marketo]]></category>
            <category><![CDATA[adobe-workfront]]></category>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[workfront-fusion]]></category>
            <category><![CDATA[workfront]]></category>
            <dc:creator><![CDATA[Ashish Kumar Gupta]]></dc:creator>
            <pubDate>Sat, 14 Jan 2023 10:54:28 GMT</pubDate>
            <atom:updated>2023-01-14T10:54:28.576Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Workfrontfusion:Create leads in marketo" src="https://cdn-images-1.medium.com/max/1024/1*Kk7isaPvPYS0L6kqwvwgug.png" /><figcaption>WorkfrontFusion: workflow to create Marketo leads</figcaption></figure><p>Workfront Fusion is the integration platform that allows you to connect Workfront to virtually any business application in your technology stack.</p><p>It provides robust capabilities to integrate Workfront into thousands of business applications.</p><p>This enables a seamless and connected enterprise knowledge work lifecycle. The power and elegance of Workfront Fusion lie in its simplicity. Workfront Fusion allows business users to create and manage a visual workflow of data processes and rules, transform data from one format to another, and monitor integrations in real-time.</p><p>To create workflow automation using work front you need access to <a href="https://apps.workfront.com/">https://apps.workfront.com</a> and there should be a certain organization under which your username should exist</p><p>Steps to develop a Workfront fusion process to create dynamic users in Marketo from excel.</p><blockquote>1 WorkfrontFusion:Create Scenario</blockquote><p>After login to the fusion interface you navigate to the left menu where you get the scenarios option, to create your scenario click on create a new scenario, you can start adding integration as per your business need</p><figure><img alt="workfrontfusion:Create scenario" src="https://cdn-images-1.medium.com/max/1024/1*WgsufhX4PLae47UjovVAyA.png" /><figcaption>workfrontfusion: HTTPS Module</figcaption></figure><blockquote>2 WorkfrontFusion:HTTPS Module</blockquote><p>Add HTTPS module to get access token for your Marketo environment</p><p>Fill below value to the HTTPS module</p><p>URL : <a href="https://799-wzc-973.mktorest.com/identity/oauth/token">https://yours.mktorest.com/identity/oauth/token</a></p><p>Method: GET</p><p>QueryString :</p><p>1 name: granttype , value: #####</p><p>2 name:clientID, value : ######</p><p>3 name:client_secret, value:######</p><p>Click OK</p><blockquote>3 WorkfrontFusion:Add Tools element</blockquote><p>set response i.e access token to access token variable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WRukGwPIz669HyvMhKMJuA.png" /></figure><blockquote>4 WorkfrontFusion:Add Microsoft 365 Integration</blockquote><p>Add another module as Microsoft 365 Excel to import excel which contains usernames for 300 users, Here I added my SharePoint connection and uploaded marketousers.xlsx which contains the username and email</p><p>After successful connection, your excel should display under workbook and the corresponding sheet under Worksheet</p><p>you can select the data range for example in my case it is from A2:B10</p><figure><img alt="workfrontfusion:MicrosoftExcelIntegration" src="https://cdn-images-1.medium.com/max/1024/1*QLo9c0SOn8bvA5kzEGfBjQ.png" /></figure><blockquote>5 WorkfrontFusion: Add Marketo Module</blockquote><p>Add another HTTPS module to create leads in Marketo by hitting the user service API of Marketo, please see the below diagram for the settings of values</p><figure><img alt="workfrontfusion :marketo https module to create leads" src="https://cdn-images-1.medium.com/max/1024/1*pnBoMyL_C7qN8tkJjzq_9g.png" /></figure><blockquote>6 WorkfrontFusion:Add Slack Integration</blockquote><p>Add Slack module to workflow to push success message with user details as slack notification.</p><figure><img alt="workfrontfusion: slack integration" src="https://cdn-images-1.medium.com/max/1024/1*AzFqQrum5w24cGtJgK95UA.png" /></figure><p>After performing the above steps just click on save to save the scenario, to run this scenario you need to click the run once button which will start the execution process and perform all the steps one by one.</p><figure><img alt="Workfrontfusion:Create leads in marketo" src="https://cdn-images-1.medium.com/max/1024/1*Kk7isaPvPYS0L6kqwvwgug.png" /><figcaption>WorkfrontFusion: workflow to create Marketo leads</figcaption></figure><blockquote>WorkfrontFusion:Advantage</blockquote><p>1 Workfrontfusion helps to do automation without writing any code i.e zero coding behind the scene</p><p>2 Easy to get and use data using simple REST endpoints of Marketo</p><p>3 Easy to integrate across the business integrations</p><p>4 Reusable process which can be used by just changing a few values across the process</p><blockquote>Conclusion</blockquote><p>I have also created update lead and delete lead scenarios on a similar concept and used these workflows to create dynamic leads in the <a href="https://www.marketo.com/marketo-engage/">Marketo</a> environment.</p><p>After reading this blog, users should be familiar with Workfront fusion which is part of <a href="https://business.adobe.com/in/products/workfront/main.html">Adobe Workfront</a>.</p><p>The user learned about the basic flow of business cases that can be automated using workflow fusion.</p><p>This blog will also help user to learn about Marketo Developer API to perform any operation which involves REST calls</p><blockquote>References</blockquote><ul><li><a href="https://developers.marketo.com/rest-api/">REST API - Marketo Developers</a></li><li><a href="https://experienceleague.adobe.com/docs/workfront/using/adobe-workfront-integrations/workfront-integrations.html?lang=en">Adobe Workfront integrations</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=105a5479fb35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploratory Data Analysis using Python Libraries]]></title>
            <link>https://medium.com/@ashishgu/exploratory-data-analysis-using-python-libraries-d1a8788be3?source=rss-9d13d0d7ab3------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1a8788be3</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[descriptive-analysis]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ashish Kumar Gupta]]></dc:creator>
            <pubDate>Tue, 03 Jan 2023 13:08:49 GMT</pubDate>
            <atom:updated>2023-01-03T13:17:13.118Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*e-O86MhLtCgEVP6u69sPMA.jpeg" /></figure><p>Hello users, I am writing this blog based on my previous learning on data analysis and exploration using python libraries which can help you to derive data insights programmatically without using excel</p><p>In the world of digital transformation, each of the customers wants to automate their business decisions on the basis of their customer engagement and behavioral data by analyzing their past behaviors.</p><p>This behavior is analyzed using descriptive analytics and predictive analytics.</p><p>Descriptive analytics is <strong>the process of using current and historical data to identify trends and relationships</strong>.</p><p>Mainly data science engineers and ML engineers use descriptive statistics to read about the data and analyze it which is the first process for creating a learning model or classification model</p><p>Here I mention a few python libraries that can help you to read and analyze the data statistics.</p><p>The first, step is to install python in your system using this link if you haven’t installed python yet</p><p>I would suggest you install anaconda Navigator and use the Jupyter kernel for this</p><p><a href="https://docs.anaconda.com/anaconda/install/mac-os/">Installing on macOS - Anaconda documentation</a></p><p>Next, you need to create your data set or you can also download any dataset from <a href="https://www.kaggle.com/">https://www.kaggle.com/</a></p><h4>Load libraries</h4><pre>import numpy             as np<br>import pandas            as pd<br>import scipy.stats       as stats<br>import matplotlib.pyplot as plt<br>import seaborn as sns</pre><h4>Import the dataset</h4><pre>df=pd.read_csv(&#39;basket.csv&#39;)<br>df.head()</pre><h4>Check the dimension of the data</h4><pre><br>df.shape</pre><p><strong>Check the Information about the data and the datatypes of each respective attribute.</strong></p><pre>df.info()</pre><h3><strong>EDA Descriptive Statistics</strong></h3><h4>Mean</h4><pre>print(&quot;Data:&quot;,df.mean())  <em># print the mean of each attribute. Ignore &quot;Serial No. as it is not a continuous variable&quot;</em></pre><h4>Median</h4><pre>print(&quot;Data:&quot;,df.median())  <em># print the mean of each attribute. Ignore &quot;Serial No. as it is not a continuous variable&quot;</em></pre><h4>Mode</h4><pre>print(&quot;Data:&quot;,df.mode())  <em># print the mean of each attribute. Ignore &quot;Serial No. as it is not a continuous variable&quot;</em></pre><h4>Quantile 25%</h4><pre>print(&quot;Data_quantile(25%):&quot;,df.quantile(q=0.25))</pre><h4>Quantile 50%</h4><pre>print(&quot;Data_quantile(50%):&quot;,df.quantile(q=0.5))</pre><h4>Quantile 75%</h4><pre>print(&quot;Data quantile(75%):&quot;,df.quantile(q=0.75))</pre><h4>Standard deviation</h4><pre>print(&quot;Data standard deviation:&quot;,df.std())</pre><h4>Variance</h4><pre>print(&quot;Data variance :&quot;,df.var())</pre><h4>Data Summary</h4><pre>print(&quot;Data summary:&quot;,df.describe())</pre><h4>Data Info</h4><pre>print(&quot;Data info:&quot;,df.info())</pre><h4>Data Covariance</h4><pre>print(&quot;Data covariance:&quot;,df.cov())</pre><h4>Data Correlation</h4><pre>print(&quot;Data correlation:&quot;,df.corr())</pre><p>To get values of the particular column name</p><pre>data_column = df[&#39;column_name&#39;]</pre><p>After reading this blog you should be able to do basic data manipulation and analysis using the python library.</p><p>In the next blog, I will mention part 2 of the exploratory data analysis using graph library as SNS and maxplotlib where you can learn about plotting analysis as uni-variate,bi-variate, and multi-variate for the given data.</p><p><strong>Conclusion</strong></p><p>After reading this blog users should be able to do basic data analysis using python APIs. The user got familiar with the descriptive features of data as well as visualize the data using the above API functions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1a8788be3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing the Journey Plugin for Adobe XD]]></title>
            <link>https://medium.com/adobetech/developing-the-journey-plugin-for-adobe-xd-ab379ea807f6?source=rss-9d13d0d7ab3------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab379ea807f6</guid>
            <category><![CDATA[xd-plugins]]></category>
            <category><![CDATA[adobe-xd]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[adobe-experience-manager]]></category>
            <category><![CDATA[adobe-creative-cloud]]></category>
            <dc:creator><![CDATA[Ashish Kumar Gupta]]></dc:creator>
            <pubDate>Thu, 12 Nov 2020 21:01:16 GMT</pubDate>
            <atom:updated>2020-11-17T15:49:16.163Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Story of an Adobe XD Plugin for Adobe Solutions Consultants Using AEM Assets and a Quick Start Guide to React Plugins</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oYtBto-yb2k2NJKX-3kcRQ@2x.png" /><figcaption>Journey Plugin Architecture Diagram</figcaption></figure><p><strong><em>Editor’s Note: </em></strong><em>Ashish Gupta is a Senior Developer (Global SOE – SV Core Tech) who has been working at Adobe for six years. He is currently developing a plugin using Adobe XD and AEM (Adobe Experience Manager) and wants to share his experience using XD plugin APIs with React.</em></p><p><em>We love XD plugins! Here are just a few of our articles about getting started with XD plugins, whether you’re a beginner or a senior developer: Beginners can check out </em><a href="https://medium.com/adobetech/do-it-yourself-xd-plugin-s-for-beginners-part-1-726cc688d988?source=friends_link&amp;sk=95aa0e4561faed99a8eda790a93465a2"><em>Do It Yourself XD Plugin(s) for Beginners Part One</em></a><em> and </em><a href="https://medium.com/adobetech/do-it-yourself-xd-plugin-s-for-beginners-part-2-b006cce35253?source=friends_link&amp;sk=b8406e1cef5de91c9d0f4b8bf88f7625"><em>Part Two</em></a><em>, or </em><a href="https://medium.com/adobetech/spinning-up-your-first-adobe-xd-plugin-7cad44c20d9a?source=friends_link&amp;sk=36b0ba79c90d09213759c2cb89fe1701"><em>Spinning Up Your First Adobe XD Plugin</em></a><em>. Advanced developers should check out </em><a href="https://medium.com/adobetech/six-steps-to-creating-your-first-xd-plugin-using-react-8f3ac48170dd?source=friends_link&amp;sk=efd6034d437e88f46bde41995c7b14de"><em>Six Steps to Creating Your First XD Plugin Using React</em></a><em>, or </em><a href="https://medium.com/adobetech/xd-plugins-from-bootstrap-to-packaging-with-xdpm-4d8adfcd79f8?source=friends_link&amp;sk=51415f80bd57234d2920e39cde1666ae"><em>From Bootstrap to Packaging with Xdpm</em></a><em>.</em></p><p><em>— Erin Finnegan, Community Engineer, Creative Cloud</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*NNcPMsrHq5MD61kO-kttSQ@2x.png" /><figcaption>A slide auto-generated from the Journey plugin for Adobe XD.</figcaption></figure><p>In this article, I will discuss the Adobe XD developer APIs I used to develop a plugin a specifically designed for Adobe employees in two parts; first, I’ll discuss the Journey plugin itself, then I’ll walk you through how to build your own Adobe XD plugin using React.</p><h3>Part 1: The Journey Plugin</h3><p>I am currently working on the “Journey” plugin, which is used internally at Adobe by the Solution Consultant team to create user customer journeys. Solution Consultants are responsible for presenting demos and POCs directly to customers using Adobe Marketing Cloud products like Adobe Experience Manager, Adobe Campaign, and Adobe Target to solve business use cases.</p><p>The SC team uses this plugin to create a customer journey by using default slides, templates, and assets provided by the plugin and editing them according to business use cases for different vertical domains.</p><p>All of the assets (.xd files, templates, png, and jpeg images) are stored in Adobe Experience Manager (AEM). Images are downloaded at run time on the plugin side by pulling the data from an AEM publish server.</p><p>The assets are then stored in the UXP file datastore (the plugin&#39;s cache). After they are downloaded from AEM and the second time, the images are rendered from the local plugin cache which is stored inside the plugin’s develop folder.</p><p>If you are an Adobe employee, you may download the Journey plugin download <a href="https://xd-plugins.adobe.com/journey/">here</a> (this link only works internally at Adobe).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*shz7xWvJgE19hddtbmothQ.png" /><figcaption>Journey’s plugin interface</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y-4LCk6C9MIsG3tiYi8Oww@2x.png" /><figcaption>Journey Plugin Flow Diagram</figcaption></figure><h3>XD APIs and UXP APIs</h3><p>Before walking through my React example, I need to define a few terms related to XD plugin development.</p><h4>XD Specific APIs</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/0*jAfnEfOJhI5tBJ9Z.png" /><figcaption>The Root Node structure of Scenegraph API</figcaption></figure><p><strong>The SceneGraph API: </strong>The SceneGraph is the content API which is used to create lines, shapes, graphs, and nodes on Adobe XD canvas or move existing objects around a document, using XD plugin APIs to work with content will enable your plugin to compliment the user’s design workflow with great speed and accuracy. It follows a tree-like structure:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9cc8630fd59c943c854bb89615aba71c/href">https://medium.com/media/9cc8630fd59c943c854bb89615aba71c/href</a></iframe><p><strong>The Application Module: </strong>The <a href="https://adobexdplatform.com/plugin-docs/reference/application.html">application</a> the module exposes APIs for exporting content, initiating edits from panel UI, and gets version and locale information:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b4cc8858b0cc4aaf3c9492694a7083a3/href">https://medium.com/media/b4cc8858b0cc4aaf3c9492694a7083a3/href</a></iframe><p>There are a few other APIs that I would like to mention here but not in detail. Below, I’ve provided links to the documentation:</p><ul><li><a href="https://adobexdplatform.com/plugin-docs/reference/assets.html">Assets</a></li><li><a href="https://adobexdplatform.com/plugin-docs/reference/clipboard.html">Clipboard</a></li><li><a href="https://adobexdplatform.com/plugin-docs/reference/cloud.html">Cloud</a></li><li><a href="https://adobexdplatform.com/plugin-docs/reference/interactions.html">Interaction</a></li><li><a href="https://adobexdplatform.com/plugin-docs/reference/commands.html">Commands</a></li><li><a href="https://adobexdplatform.com/plugin-docs/reference/viewport.html">Viewport</a></li></ul><h4><strong>The Unified Extensibility Platform (UXP</strong>)</h4><p><a href="https://medium.com/adobetech/announcing-uxp-in-photoshop-288496ab5e3e?source=friends_link&amp;sk=40d4ae0bf461e8f79d3a41047126a7c8">UXP is a new extensibility architecture</a> that provides commonly used APIs across different Creative Cloud applications. Currently (as of November 2020) UXP is available in Photoshop and Adobe XD, but it’s coming soon to other Creative Cloud applications.</p><p>It contains several cross-app APIs, including a Storage API and a Network API.</p><p><strong>The Storage API</strong>: Whenever you install a plugin in Adobe XD, it generally creates a plugin folder inside Adobe XD &gt; pluginID &gt; plugins. This folder is used for storing local data.</p><p>We need to import fs library from UXP storage to perform File I/O operations and use this API to store the data in the plugin’s cache folder, which gets created by default after installing a plugin:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1cad1d075a1b6abb6a72f40f6c78988f/href">https://medium.com/media/1cad1d075a1b6abb6a72f40f6c78988f/href</a></iframe><p><strong>The Network API: </strong>Generally, we use the <strong>Axios</strong> node API and the <strong>fetch</strong> node API to read third-party data from an externally hosted API to our XD plugin and make asynchronous requests called using the await keyword inside the async() method.</p><p>For more details about Axios and fetch you can read the documentation here:</p><ul><li><a href="https://www.npmjs.com/package/axios">axios</a></li><li><a href="https://javascript.info/fetch-api">Fetch API</a></li></ul><p>Here’s an example of a Network API call:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a160732a14362fb9faf86b7e0b455d76/href">https://medium.com/media/a160732a14362fb9faf86b7e0b455d76/href</a></iframe><p><strong>The Shell: </strong>The Shell is generally used to open external URLs from the Adobe XD platform:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f48dba4b69ad62d552f2b1b3b65b3cf5/href">https://medium.com/media/f48dba4b69ad62d552f2b1b3b65b3cf5/href</a></iframe><p><strong>UI APIs: </strong>These support HTML, CSS, and events.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f42f654bb124a5e453e9b2e134db76a/href">https://medium.com/media/9f42f654bb124a5e453e9b2e134db76a/href</a></iframe><p><strong>The Plugin Toolkit API: </strong>Plugin Toolkit API is used to display UI in the form of modal dialogs, built with <a href="https://adobexdplatform.com/plugin-docs/GLOSSARY.html#javascript">JavaScript</a>, and a supports a subset of <a href="https://adobexdplatform.com/plugin-docs/GLOSSARY.html#html">HTML</a> and <a href="https://adobexdplatform.com/plugin-docs/GLOSSARY.html#css">CSS</a>. For simple alerts and messages, we’ve also built various helpers which make it easy to display important messages, get user feedback, and more.</p><h3>Part 2: <strong>How to create your first plugin with React; A Quick Start Guide</strong></h3><h4><strong>Prerequisites</strong></h4><ol><li>Basic knowledge of HTML, CSS, React JS</li><li>Node, npm, and yarn should be installed</li><li>Adobe XD, the product, which can be installed from <a href="https://www.adobe.com/in/products/xd.html?gclid=CjwKCAjw74b7BRA_EiwAF8yHFNJ0WH-0V0E2Iht_zsBlPFeKhDU_ZaR69IV_tQytFhE1QlBGdKYiLxoC7U4QAvD_BwE&amp;sdid=WPHDJDC9&amp;mv=search&amp;ef_id=CjwKCAjw74b7BRA_EiwAF8yHFNJ0WH-0V0E2Iht_zsBlPFeKhDU_ZaR69IV_tQytFhE1QlBGdKYiLxoC7U4QAvD_BwE:G:s&amp;s_kwcid=AL!3085!3!302255501721!p!!g!!adobe!800727550!42422798395">here</a></li><li>A text editor or code editor; It’s better to use a JavaScript-based editor to create your plugin’s base project. I generally use <a href="https://atom.io/">Atom</a> to create plugins.</li></ol><h4><strong>The Adobe I/O Console</strong></h4><p>First of all, you’ll need to create a pluginID using the <a href="https://console.adobe.io/projects">Adobe I/O console</a>. This plugin ID is basically an eight-digit alphanumeric number that uniquely distinguishes each plugin.</p><h4>Get a plugin ID from the Adobe Developer Console</h4><p>Before you start, you’ll want to create a plugin project on the Adobe <a href="https://adobexdplatform.com/plugin-docs/GLOSSARY.html#developer-console">Developer Console</a>.</p><ol><li><a href="https://console.adobe.io/projects">Go to the Adobe Developer Console and sign in or sign up</a></li><li>Click “Create Empty Project”</li><li>Create a plugin project by clicking “Add XD Plugin”</li><li>Give it a project name. Note that this project name is not public; it is only visible to you and can be changed directly on the Console later.</li><li>On the following page, get the 8-character unique plugin ID in the “Plugin Details” section.</li></ol><h4>Identify where your plugins are located</h4><p>Adobe XD loads plugins that are in development from a develop folder in a specific location on your machine. To get to that folder, simply go to this menu item within XD: <em>Plugins &gt; Development &gt; Show Develop Folder</em>.</p><h4><strong>Create the Contents of Your Plugin Folder</strong></h4><p>Below we will use a webpack module that will render a single JS wrapper of the whole application.</p><p>Make a new folder within the develop folder to store the plugin files that you&#39;ll create below.</p><p>Here is the sample plugin’s file structure:</p><pre>my-plugin-folder<br>└── src<br>    └── main.js<br>    └── Panel.js<br>└── manifest.json<br>└── package.json<br>└── webpack.config.js</pre><p>Paste the contents below into each file in the structure outlined above.</p><p>The package.json file contents:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d46b4e039e2c000bd50aeaf9f6f813c/href">https://medium.com/media/2d46b4e039e2c000bd50aeaf9f6f813c/href</a></iframe><p>The webpack.config.js file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0bae95fddd20d405d20df2cd3dcb1d06/href">https://medium.com/media/0bae95fddd20d405d20df2cd3dcb1d06/href</a></iframe><p>The manifest.json file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/52988e23dd3688c556e9e53b862c72dd/href">https://medium.com/media/52988e23dd3688c556e9e53b862c72dd/href</a></iframe><p>The Panel.js file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/df05f0ae1a2657ed08176ebea3164078/href">https://medium.com/media/df05f0ae1a2657ed08176ebea3164078/href</a></iframe><p>The main.js file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a40502eeb306df03099855a4752a3d72/href">https://medium.com/media/a40502eeb306df03099855a4752a3d72/href</a></iframe><h4>Install Yarn</h4><p>Next, install <strong>yarn</strong> if you need to:</p><pre>npm install -g yarn</pre><p>Install the dependencies that are defined under package.json:</p><pre>yarn install</pre><p>After that, you’ll need to open the terminal with the project folder path and run this command in your plugin’s root folder:</p><pre>To complile<br>Development Environment : yarn watch</pre><pre>Production Environment :yarn build</pre><h4><strong>Run your plugin</strong></h4><p>If you haven’t already done so, launch XD and open a new document. Then navigate to the Plugins &gt; Quick Start — React menu item.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VC_tckzUk-hMSKQaueDWtw.png" /><figcaption>The React sample code above in action</figcaption></figure><p>Alternatively, if XD was already open, select Plugins &gt; Development &gt; Reload Plugins.</p><h3>Try Journey, or Build a React Plugin of Your Own</h3><p>If you’re an Adobe employee, try <a href="https://xd-plugins.adobe.com/journey/">using the Journey plugin</a>.</p><p>Are you ready to build an Adobe XD plugin using the network API? Think you can fetch data from an external API in JSON and use it inside a plugin? Let us know in <a href="https://forums.creativeclouddeveloper.com/c/adobe-xd/61">the XD plugin developer forums</a>.</p><h3><strong>References</strong></h3><p><a href="https://adobexdplatform.com/plugin-docs/">Overview</a></p><ul><li><a href="https://medium.com/@benbrewerbowman/how-to-learn-reactjs-for-2019-7e33e60eb3d7">Basic React Tutorial</a></li><li><a href="https://github.com/AdobeXD/plugin-samples">Official GitHub Plugin Examples</a></li><li><a href="https://forums.creativeclouddeveloper.com/c/adobe-xd/61">XD Platform Forums</a></li><li><a href="https://adobexdplatform.com/plugin-docs/plugin-api-roadmap.html">XD API Roadmap</a></li><li><a href="https://xd-plugins.adobe.com/journey/">https://xd-plugins.adobe.com/journey/</a> (Adobe employees only.)</li></ul><p><em>For more stories like this, subscribe to our </em><a href="http://adobe.ly/devnews"><em>Creative Cloud Developer Newsletter</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab379ea807f6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/adobetech/developing-the-journey-plugin-for-adobe-xd-ab379ea807f6">Developing the Journey Plugin for Adobe XD</a> was originally published in <a href="https://medium.com/adobetech">Adobe Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Write Automated Test Cases for Adobe Experience Manager Projects]]></title>
            <link>https://medium.com/adobetech/how-to-write-automated-test-cases-for-adobe-experience-manager-project-c346cd21fb56?source=rss-9d13d0d7ab3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c346cd21fb56</guid>
            <category><![CDATA[adobe-experience-cloud]]></category>
            <category><![CDATA[junit-5]]></category>
            <category><![CDATA[automated-testing]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[mockito]]></category>
            <dc:creator><![CDATA[Ashish Kumar Gupta]]></dc:creator>
            <pubDate>Mon, 20 Apr 2020 15:39:40 GMT</pubDate>
            <atom:updated>2020-04-22T18:47:37.822Z</atom:updated>
            <content:encoded><![CDATA[<p>In the software development lifecycle, testing plays a vital role with respect to quality assurance and quality control of any project. Automated testing saves a lot of time when building and releasing different versions of a project.</p><p>It becomes a tedious task for a QA team to do manual testing after each iteration for same functionality repeatedly. In this post, I will share a few tips and tricks to writing test cases for different testing scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*yE5FzREm0bDsNXG-.jpg" /></figure><p>Specifically, let’s look at writing automated test cases for an AEM-based project. There are different modules in AEM: the core bundle, which includes OSGI services, sling servlets, ad sling models; and ui.apps, which includes AEM components, AEM pages, templates, and HTML markups.</p><p>As a project and code base grows, it is really important to make sure that test coverage for the code is there to maintain consistency and sanity. Writing test cases for AEM is different from writing conventional Java test cases, and this can make it difficult for a beginner to write test cases for AEM application</p><h4><strong>Adobe Solution</strong></h4><p>AEM 6.5</p><h4><strong>Installation</strong></h4><ul><li>jdk1.8 has to be installed in your system</li><li>Maven has to be installed in your system</li><li>AEM 6.5 author instance has to be running</li></ul><h4><strong>Prerequisites</strong></h4><ul><li>Make sure you’re familiar with the Java Junit test framework: <a href="http://junit.org/">http://junit.org</a></li><li>Make sure you’re familiar with the Java Mockito test framework: <a href="http://site.mockito.org/">http://site.mockito.org/</a></li><li>Optional: Familiarity with the PowerMockito test framework <a href="http://powermock.github.io/">http://powermock.github.io/</a></li></ul><h4><strong>Good to know</strong></h4><ul><li>Sling test framework (Mock and IT): <a href="https://sling.apache.org/documentation/development/sling-testing-tools.html">https://sling.apache.org/documentation/development/sling-testing-tools.html</a></li><li>AEM Mock: <a href="http://wcm.io/testing/aem-mock/">http://wcm.io/testing/aem-mock/</a> and <a href="http://wcm.io/testing/aem-mock/apidocs/">http://wcm.io/testing/aem-mock/apidocs/</a></li><li>WCMUse classes Mocking: <a href="http://aempodcast.com/2015/testing/unit-testing-wcmuse-classes-using-mockito/#.WEmiUMMrJKc">http://aempodcast.com/2015/testing/unit-testing-wcmuse-classes-using-mockito/#.WEmiUMMrJKc</a></li></ul><p>Next, these dependencies need to be added in parent pom.xml:</p><pre>&lt;dependencies&gt;<br>    ...<br>    &lt;!-- Testing --&gt;<br>     &lt;dependency&gt;<br>         &lt;groupId&gt;org.junit&lt;/groupId&gt;<br>         &lt;artifactId&gt;junit-bom&lt;/artifactId&gt;<br>         &lt;version&gt;5.5.2&lt;/version&gt;<br>         &lt;type&gt;pom&lt;/type&gt;<br>         &lt;scope&gt;import&lt;/scope&gt;<br>     &lt;/dependency&gt;<br>     &lt;dependency&gt;<br>         &lt;groupId&gt;org.slf4j&lt;/groupId&gt;<br>         &lt;artifactId&gt;slf4j-simple&lt;/artifactId&gt;<br>         &lt;version&gt;1.7.25&lt;/version&gt;<br>         &lt;scope&gt;test&lt;/scope&gt;<br>     &lt;/dependency&gt;<br>     &lt;dependency&gt;<br>         &lt;groupId&gt;org.mockito&lt;/groupId&gt;<br>         &lt;artifactId&gt;mockito-core&lt;/artifactId&gt;<br>         &lt;version&gt;2.25.1&lt;/version&gt;<br>         &lt;scope&gt;test&lt;/scope&gt;<br>     &lt;/dependency&gt;<br>     &lt;dependency&gt;<br>         &lt;groupId&gt;org.mockito&lt;/groupId&gt;<br>         &lt;artifactId&gt;mockito-junit-jupiter&lt;/artifactId&gt;<br>         &lt;version&gt;2.25.1&lt;/version&gt;<br>         &lt;scope&gt;test&lt;/scope&gt;<br>     &lt;/dependency&gt;<br>     &lt;dependency&gt;<br>         &lt;groupId&gt;junit-addons&lt;/groupId&gt;<br>         &lt;artifactId&gt;junit-addons&lt;/artifactId&gt;<br>         &lt;version&gt;1.4&lt;/version&gt;<br>         &lt;scope&gt;test&lt;/scope&gt;<br>     &lt;/dependency&gt;<br>     &lt;dependency&gt;<br>         &lt;groupId&gt;io.wcm&lt;/groupId&gt;<br>         &lt;artifactId&gt;io.wcm.testing.aem-mock.junit5&lt;/artifactId&gt;<br>         &lt;!-- Prefer the latest version of AEM Mock Junit5 dependency --&gt;<br>         &lt;version&gt;2.5.2&lt;/version&gt;<br>         &lt;scope&gt;test&lt;/scope&gt;<br>     &lt;/dependency&gt;<br>    ...<br>&lt;/dependencies&gt;</pre><p>Below, you’ll see the plugins and dependencies that you need to add in pom.xml under core package i.e core/pom.xml:</p><pre>    &lt;plugin&gt;<br>         &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;<br>                &lt;version&gt;2.22.0&lt;/version&gt;<br>                &lt;configuration&gt;<br>                    &lt;includes&gt;<br>                        &lt;include&gt;*Test.java&lt;/include&gt;<br>                    &lt;/includes&gt;<br>                    &lt;skipTests&gt;${skipTests}&lt;/skipTests&gt;<br>                    &lt;trimStackTrace&gt;false&lt;/trimStackTrace&gt;<br>                &lt;/configuration&gt;<br>    &lt;/plugin&gt;<br>--------------------------------------------------------------------</pre><pre>         &lt;execution&gt;<br>               &lt;id&gt;report&lt;/id&gt;<br>                &lt;phase&gt;test&lt;/phase&gt;<br>                &lt;goals&gt;<br>                    &lt;goal&gt;report&lt;/goal&gt;<br>               &lt;/goals&gt;<br>         &lt;/execution&gt;<br>-------------------------------------------------------------------</pre><pre>...<br>     &lt;dependency&gt;<br>         &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;<br>         &lt;artifactId&gt;junit-jupiter&lt;/artifactId&gt;<br>         &lt;scope&gt;test&lt;/scope&gt;<br>     &lt;/dependency&gt;<br>     &lt;dependency&gt;<br>         &lt;groupId&gt;org.mockito&lt;/groupId&gt;<br>         &lt;artifactId&gt;mockito-core&lt;/artifactId&gt;<br>         &lt;scope&gt;test&lt;/scope&gt;<br>     &lt;/dependency&gt;<br>     &lt;dependency&gt;<br>         &lt;groupId&gt;org.mockito&lt;/groupId&gt;<br>         &lt;artifactId&gt;mockito-junit-jupiter&lt;/artifactId&gt;<br>         &lt;scope&gt;test&lt;/scope&gt;<br>     &lt;/dependency&gt;<br>     &lt;dependency&gt;<br>         &lt;groupId&gt;junit-addons&lt;/groupId&gt;<br>         &lt;artifactId&gt;junit-addons&lt;/artifactId&gt;<br>     &lt;/dependency&gt;<br>     &lt;dependency&gt;<br>         &lt;groupId&gt;io.wcm&lt;/groupId&gt;<br>         &lt;artifactId&gt;io.wcm.testing.aem-mock.junit5&lt;/artifactId&gt;<br>     &lt;/dependency&gt;<br>     ...</pre><h3>Writing test cases for generic helper class</h3><p>This is the simplest use case; your generic helper class (for example, StringUtils, DateUtils) does not use any AEM libraries. For this you can simply use Junit to write your unit test: <a href="https://www.tutorialspoint.com/junit">https://www.tutorialspoint.com/junit</a>.</p><p>Here, you need to use a @ Test annotation at the method level; for example, below I have added a @ Test annotation for the testIsEmpty() method, checking various scenarios using the assertTrue and assertFalse function by comparing expected value and actual value.</p><pre><strong>public</strong> <strong>class</strong> <strong>ExampleTest</strong> {<br><br>  <strong>@Test</strong><br>  <strong>public</strong> <strong>void</strong> <strong>testIsEmpty</strong>() {<br>   assertTrue(CommonStringUtil.isEmpty(“”));<br>   assertFalse(CommonStringUtil.isEmpty(“ “));<br>  }<br>}</pre><h3><strong>Writing test cases for AEM services</strong></h3><p>Now this is where it gets a bit tricky, where you need to mock certain behaviors of bundle and implicit objects. That’s why Sling has created a Mock version of sling objects and wcm.io has created a mock version of AEM objects. Here, you can just use aem mock: <a href="https://wcm.io/testing/aem-mock/usage.html">https://wcm.io/testing/aem-mock/usage.html</a> to achieve most of your use cases (AEM mock extends Sling mock).</p><p>Below are some of the common use cases you will come across while testing your service:</p><h4><strong>1) How can I mock content my service is running against?</strong></h4><p>For this, it is recommended to use contentLoader API: <a href="http://wcm.io/testing/aem-mock/usage.html">http://wcm.io/testing/aem-mock/usage.html</a> to either load existing json based resources (you can simply get it by creating a resource in CRXDE and then use something like RESOURCEPATH.infinity.json to get json for that resource) or just create mock resource using ContentBuilder context.create().resource() or ResourceBuilder context.build().resource(): <a href="http://wcm.io/testing/aem-mock/apidocs/">http://wcm.io/testing/aem-mock/apidocs/</a>.</p><p>Note that if you are mocking a Page object then you have to use aem mock using aemcontext.pageManager().create()</p><h4><strong>2) How can I initialize properties in the bundle?</strong></h4><p>You can use register and activate the OSGI service with properties: <a href="http://wcm.io/testing/aem-mock/usage.html#Registering_OSGi_service">http://wcm.io/testing/aem-mock/usage.html#Registering_OSGi_service</a>. Here is an example using AEM context Junit5:</p><pre><strong>@ExtendWith</strong>(AemContextExtension.class)<br><strong>public</strong> <strong>class</strong> <strong>ExampleTest</strong> {<br><br>  <strong>private</strong> <strong>final</strong> AemContext context = <strong>new</strong> AemContext();<br><br>  <strong>@Test</strong><br>  <strong>public</strong> <strong>void</strong> <strong>testSomething</strong>() {<br>    Resource resource = context.resourceResolver().getResource(&quot;/content/sample/en&quot;);<br>    Page page = resource.adaptTo(Page.class);<br>    <em>// further testing</em><br>  }<br><br>}</pre><h4><strong>3) How can I inject other services for my service?</strong></h4><p>You can either Mock service or use a register service API for this: <a href="http://wcm.io/testing/aem-mock/usage.html#Registering_OSGi_service">http://wcm.io/testing/aem-mock/usage.html#Registering_OSGi_service</a></p><p>Note that when you inject a service to your service using Reference then you will have to register your injected service, otherwise your test will fail.</p><pre><strong>@ExtendWith</strong>(AemContextExtension.class)<br><a href="http://twitter.com/ExtendWith">@<strong>ExtendWith</strong></a>(MockitoExtension.class)<br><strong>public</strong> <strong>class</strong> <strong>ExampleServiceTest</strong> {<br><br> <strong>private</strong> <strong>final</strong> AemContext context = <strong>new </strong>AemContextBuilder().build();</pre><pre><strong>@Mock</strong><br>  BlogService blogService;</pre><pre><strong>@Test</strong><br>  <strong>public</strong> <strong>void</strong> <strong>testSomething</strong>() {<br>   context.load().json(&quot;/content/sample/en.json&quot;);<br>   context.registerService(BlogService.class,blogService);<br>Mockito.when(context.getService(BlogService.class).calledMethod(notNull).thenReturn(&quot;expectedString&quot;)<br>//further testing</pre><pre>}<br><br>}</pre><h4><strong>4) How can I test a sling model?</strong></h4><p>You can use aemContext for this: <a href="http://wcm.io/testing/aem-mock/usage.html#Sling_Models">http://wcm.io/testing/aem-mock/usage.html#Sling_Models</a>.</p><pre><strong>@Before</strong><br><strong>public</strong> <strong>void</strong> <strong>setUp</strong>() {<br>  <em>// register models from package</em><br>  context.addModelsForPackage(&quot;com.app1.models&quot;);<br>}<br><br><strong>@Test</strong><br><strong>public</strong> <strong>void</strong> <strong>testSomething</strong>() {<br>  RequestAttributeModel model = context.request().adaptTo(RequestAttributeModel.class);<br>  <em>// further testing</em><br>}<br><br><strong>@Model</strong>(adaptables = SlingHttpServletRequest.class)<br><strong>interface</strong> <strong>RequestAttributeModel</strong> {<br>  <strong>@Inject</strong><br>  String <strong>getProp1</strong>();<br>}<br>//further testing</pre><h3>Writing test cases for AEM servlets</h3><p>This is very similar to how you would do test cases for Service. For request and response you either have to mock request/response object using Mockito or use Spy or use a sling request and response mock. Since a lot of methods in filter and servlet do not return any result, make Mockito verify your friend. Here is an example using simple Mockito to test a servlet:</p><pre><strong>@ExtendWith</strong>(AemContextExtension.class)<br><a href="http://twitter.com/ExtendWith">@<strong>ExtendWith</strong></a>(MockitoExtension.class)<br><strong>public</strong> <strong>class</strong> <strong>ExampleServletTest</strong> {<br><br> <strong>private</strong> <strong>final</strong> AemContext context = <strong>new </strong>AemContextBuilder().build();</pre><pre><strong>@Mock</strong><br>  UserService userService;</pre><pre><a href="http://twitter.com/Spy"><strong>@Spy</strong></a><br>  BlogService blogService = new BlogServiceImpl();</pre><pre><a href="http://twitter.com/InjectMocks"><strong>@InjectMocks</strong></a><br>    <strong>ExampleServletTest </strong>exampleServlet = new <strong>ExampleServletTest</strong>();</pre><pre><strong>@BeforeEach</strong><br>  public void setUp() {<br>   context.load().json(&quot;/content/sample/en.json&quot;);<br>   context.registerService(UserService.class,userService);<br>   context.registerInjectActivateService(blogService);<br>}<br> <a href="http://twitter.com/Test"><strong>@Test</strong></a><strong>()</strong></pre><pre> public void doGetmethod500error() throws IOException {<br>  Map&lt;String, Object&gt; parameters = new HashMap&lt;&gt;();<br>  parameters.put(&quot;projectId&quot;, &quot;1234&quot;);<br>Mockito.when(context.getService(UserService.class).getUser(&quot;username&quot;)<br>    .thenReturn(new Response(errorResponseMsg, 500));<br> MockSlingHttpServletRequest request = new MockSlingHttpServletRequest(context.resourceResolver(),<br>    context.bundleContext());<br>  MockSlingHttpServletResponse response = new MockSlingHttpServletResponse();<br>  request.setParameterMap(parameters);<br>  exampleServlet.doGet(request, response);<br>  String endResponseStr = response.getOutputAsString();<br>  assertNotNull(endResponseStr);<br>//further testing</pre><pre>}<br>}</pre><h4><strong>Test cases execution</strong></h4><p>You need to open terminal with the working directory as your AEM project and will need to run this command: mvn clean test</p><h3>Conclusion</h3><p>Ideally, in my opinion goals are set at the beginning of the AEM project, such as aiming for 80% of test cases to be automated. That’s a goal that most organisations can achieve when they start building automated AEM test cases from the start.</p><p>As writing the automation test cases is one of the best coding practise in IT industry as it helps in quality as well as productivity .</p><p>I hope this blog helps you to provide better guidance for writing automation test cases for Adobe Experience Manager based project as well as covered all the scenarios of testing like unit testing and integration testing scripts in AEM.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c346cd21fb56" width="1" height="1" alt=""><hr><p><a href="https://medium.com/adobetech/how-to-write-automated-test-cases-for-adobe-experience-manager-project-c346cd21fb56">How to Write Automated Test Cases for Adobe Experience Manager Projects</a> was originally published in <a href="https://medium.com/adobetech">Adobe Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>