<?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 Dilshani Subasinghe on Medium]]></title>
        <description><![CDATA[Stories by Dilshani Subasinghe on Medium]]></description>
        <link>https://medium.com/@dilshani?source=rss-6ad23f43fbc0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*XkEC_B7MuHE5xyRD.jpg</url>
            <title>Stories by Dilshani Subasinghe on Medium</title>
            <link>https://medium.com/@dilshani?source=rss-6ad23f43fbc0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 23:33:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dilshani/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[[Playwright] Conditional Tests]]></title>
            <link>https://dilshani.medium.com/playwright-conditional-tests-4863a5d6aabb?source=rss-6ad23f43fbc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/4863a5d6aabb</guid>
            <category><![CDATA[conditioning]]></category>
            <category><![CDATA[playwright-community]]></category>
            <category><![CDATA[jest]]></category>
            <dc:creator><![CDATA[Dilshani Subasinghe]]></dc:creator>
            <pubDate>Thu, 28 Jan 2021 10:13:22 GMT</pubDate>
            <atom:updated>2021-01-28T10:13:22.235Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tha7F9aaYk8TGC1Qw9FNzg.png" /></figure><p><strong>Usecase</strong>:</p><ul><li>Run tests with a condition. In my case needed to run some of the tests on a specific environment (CI)</li></ul><p><strong>Solution</strong>:</p><ul><li>Conditional tests with “test.only”</li></ul><p><strong>Techstack of my solution:</strong></p><ul><li>Playwright</li><li>Jest</li><li>Typescript</li></ul><p><strong>Implementation:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3fb03015a239ebd6160ce05d48e0c17c/href">https://medium.com/media/3fb03015a239ebd6160ce05d48e0c17c/href</a></iframe><p>Add your condition before tests. As per my structure</p><pre>describe()</pre><pre>     if() --&gt; conditional implementation<br>    <br>     it()<br>     <br>     it()</pre><p>Tests only run if condition passed with given value.</p><p>Hope this post may save your time when needed. Happy coding :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4863a5d6aabb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Start UI tests with Playwright + Jest + Typescript]]></title>
            <link>https://dilshani.medium.com/start-ui-tests-with-playwright-jest-typescript-8dcbf4646bcb?source=rss-6ad23f43fbc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/8dcbf4646bcb</guid>
            <category><![CDATA[jest]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[puppeteer]]></category>
            <category><![CDATA[playwrights]]></category>
            <category><![CDATA[automation-testing]]></category>
            <dc:creator><![CDATA[Dilshani Subasinghe]]></dc:creator>
            <pubDate>Fri, 15 Jan 2021 06:46:55 GMT</pubDate>
            <atom:updated>2021-01-28T10:14:55.948Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*T7pmhcYKrWtfKiezCsVWNw.png" /></figure><p>Playwright is easy to install and start to work with. Just have to create a fresh project and install the playwright as a dependency.</p><ol><li>Create a new project</li></ol><pre><em>$ npm init -y</em></pre><p>2. Install Playwright</p><pre><em>$ npm install — save-dev playwright</em></pre><p>3. Choosing Typescript as the scripting language</p><pre><em>$ npm install — save-dev typescript</em></pre><p>Typescript config in “<em>tsconfig.json</em>“</p><pre>{<br>  &quot;compilerOptions&quot;: {<br>    &quot;target&quot;: &quot;es6&quot;,<br>    &quot;lib&quot;: [&quot;dom&quot;, &quot;dom.iterable&quot;, &quot;esnext&quot;],<br>    &quot;strict&quot;: true,<br>    &quot;module&quot;: &quot;commonjs&quot;,<br>    &quot;noEmit&quot;: true<br>  },<br>  &quot;include&quot;: [&quot;src&quot;]<br>}</pre><p>** As per config, we should add all tests &amp; other classes inside of the “src/” folder</p><p>4. Add Jest as the test runner</p><pre><em>$ npm install — save-dev jest</em></pre><p>As we using typescript in the project</p><pre><em>$ npm install — save-dev ts-jest @types/jest</em></pre><p>For configuration between jest &amp; playwright</p><pre><em>$ npm install — save-dev jest-playwright-preset</em></pre><p>5. Set up Jest Config &amp; test config with package.json</p><p><em>jest.config.js</em></p><pre>module.exports = {<br>    preset: &quot;jest-playwright-preset&quot;,<br>    testMatch: [&quot;**/__tests__/**/*.+(ts|js)&quot;, &quot;**/?(*.)+(spec|test).+(ts|js)&quot;],<br>    transform: {<br>      &quot;^.+\\.(ts)$&quot;: &quot;ts-jest&quot;,<br>    },<br>    testTimeout: 20000,<br>    testEnvironmentOptions: {<br>      &quot;jest-playwright&quot;: {<br>       browsers: [ &quot;chromium&quot;, &quot;firefox&quot;],<br>        launchOptions: {<br>        //headless: false,<br>       // slowMo: 600,<br>        }<br>      }<br>    },<br>  };</pre><ul><li>preset — Integration with jest &amp; playwright</li><li>testMatch — spec pattern that need to be run</li><li>transform — typescript test compatible with jest</li><li>testTimeout — global test timeout</li><li>testEnvironmentOptions — test specific more configurations [browsers — Multiple browsers that tests should be running in, launchOptions — browser launch options. can use to make tests headless and slow down test progress] More configs: <a href="https://jestjs.io/docs/en/configuration">https://jestjs.io/docs/en/configuration</a></li></ul><p><em>package.json</em></p><pre>&quot;scripts&quot;: {<br>    &quot;test&quot;: &quot;jest --detectOpenHandles&quot;,<br>    &quot;test.watch&quot;: &quot;jest --watchAll&quot;<br>  },<br>  &quot;devDependencies&quot;: {<br>    &quot;@types/jest&quot;: &quot;^26.0.19&quot;,<br>    &quot;jest&quot;: &quot;^26.6.3&quot;,<br>    &quot;jest-junit&quot;: &quot;^12.0.0&quot;,<br>    &quot;jest-playwright-preset&quot;: &quot;^1.4.3&quot;,<br>    &quot;playwright&quot;: &quot;^1.7.1&quot;,<br>    &quot;ts-jest&quot;: &quot;^26.4.4&quot;,<br>    &quot;typescript&quot;: &quot;^4.1.3&quot;<br>  }</pre><ul><li>scripts — Define your testing scripts to run with “npm“</li></ul><p>With this config tests can be run as:</p><pre><em>$ npm test</em></pre><p>For running a specific test file give its file path</p><pre><em>$ npm test src/specs/login.test.js</em></pre><p>6. Add Junit reporter for framework</p><p>Integrated jest JUnit reporter to generate xml report. There are many other reporters available to integrate with jest for better reporting: <a href="https://github.com/jest-community/awesome-jest#reporters">https://github.com/jest-community/awesome-jest#reporters</a></p><pre><em>$ npm i — save-dev jest-junit-reporter</em></pre><p>Add reporter config in “<em>jest.config.js</em>“</p><pre>reporters: [<br>      &quot;default&quot;,<br>        [<br>          &quot;jest-junit&quot;,<br>           {<br>            classNameTemplate: (vars) =&gt; {<br>              return vars.classname.toUpperCase();<br>            },<br>            &quot;outputDirectory&quot;: &quot;reports&quot;,<br>            &quot;outputName&quot;: &quot;test_report.xml&quot;<br>          }<br>        ]<br>    ]</pre><ul><li>jest-junit — Define test report configs</li><li>outputDirectory — Define location to create reports</li><li>outputName — Test report name</li></ul><p><strong>Extra</strong> — Debug settings with vscode IDE</p><p>While debugging tests will be timeout with 10s default timeout. To avoid that, can have specific configs to define debug settings in jest.</p><ol><li>create debug settings file <em>jest.debug-setup.js</em></li></ol><pre>jest.setTimeout(1000000);</pre><p>2. Point debug setup file through vscode code settings (.vscode &gt; <em>launch.json</em>)</p><pre>{<br>    &quot;version&quot;: &quot;0.2.0&quot;,<br>    &quot;configurations&quot;: [<br>    {<br>        &quot;name&quot;: &quot;Debug Jest Tests&quot;,<br>        &quot;type&quot;: &quot;node&quot;,<br>        &quot;request&quot;: &quot;launch&quot;,<br>        &quot;program&quot;: &quot;${workspaceFolder}/node_modules/.bin/jest&quot;,<br>        &quot;args&quot;: [&quot;--runInBand&quot;, &quot;--setupFilesAfterEnv=&#39;${workspaceFolder}/jest.debug-setup.js&#39;&quot;],<br>        &quot;windows&quot;: {<br>          &quot;program&quot;: &quot;${workspaceFolder}/node_modules/jest/bin/jest&quot;<br>        },<br>        &quot;console&quot;: &quot;integratedTerminal&quot;,<br>        &quot;internalConsoleOptions&quot;: &quot;neverOpen&quot;<br>      }<br>    ]<br>  }</pre><p>— setupFilesAfterEnv use this param to point debug settings file</p><p><strong>Project Structure</strong></p><pre>&lt;Project_Name&gt;<br>   |__ src<br>       |__ specs  &lt;Test cases&gt;<br>       |__ models &lt;For handling page objects&gt;<br>       |__ helper &lt;Supporting classes&gt;<br>       |__ enums &lt;Constants used for project&gt;<br>   |__ report<br>   |__ config.json<br>   |__ jest.config.js<br>   |__ jest.debug-setup.js<br>   |__ package.json<br>   |__ tsconfig.json</pre><p><strong>Sample test case</strong></p><p>Jest provides global test objects Page, BrowserContext, Browser etc. Hence created a global test file to manage common objects.</p><p><em>globalTypes.ts</em></p><pre>import { Browser, Page } from &quot;playwright&quot;;<br>declare global {<br>  const browser: Browser;<br>  const page: Page;<br>  const browserName: string;<br>}</pre><p><em>google.search.test.ts</em></p><pre>describe(`Google Test Case`, () =&gt; {<br>  it(&quot;returns successful search&quot;, async () =&gt; {<br>    await page.goto(&quot;https://www.google.com/&quot;);</pre><pre>    // Click input[aria-label=&quot;Search&quot;]<br>    await page.click(&#39;input[aria-label=&quot;Search&quot;]&#39;);</pre><pre>    // Fill input[aria-label=&quot;Search&quot;]<br>    await page.fill(&#39;input[aria-label=&quot;Search&quot;]&#39;, &quot;tesla&quot;);</pre><pre>    // Press Enter<br>    await page.press(&#39;input[aria-label=&quot;Search&quot;]&#39;, &quot;Enter&quot;);</pre><pre>    // Close page<br>    await page.close();<br>  });<br>});</pre><p>Jest assertions can be used for validate page objects. More info: <a href="https://jestjs.io/docs/en/using-matchers">https://jestjs.io/docs/en/using-matchers</a></p><p>Thats it! Its’ time to explore more on playwright on your own. Happy coding :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8dcbf4646bcb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Latest UI automation test frameworks Review]]></title>
            <link>https://dilshani.medium.com/latest-ui-automation-test-frameworks-review-e295945cc41e?source=rss-6ad23f43fbc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e295945cc41e</guid>
            <category><![CDATA[automation-tools]]></category>
            <category><![CDATA[puppeteer]]></category>
            <category><![CDATA[playwright-community]]></category>
            <category><![CDATA[webdriverio]]></category>
            <category><![CDATA[cypress]]></category>
            <dc:creator><![CDATA[Dilshani Subasinghe]]></dc:creator>
            <pubDate>Sun, 10 Jan 2021 11:10:52 GMT</pubDate>
            <atom:updated>2021-01-11T02:32:08.003Z</atom:updated>
            <content:encoded><![CDATA[<p>As I was selecting the UI test framework for a web project, done a little bit of research depending on Project Requirements. Hope this post will help techies who looking for a quick review of the latest frameworks.</p><h4><strong>Use Case</strong></h4><ul><li>UI Test Automation for Web project written in Angular.</li><li>Need multi-browser support including Chrome, Firefox &amp; Safari</li><li>Efficient Testing and easy integration in CI</li><li>Better if Typescript support as it was primary programming language used for existing projects.</li></ul><h4><strong>Reviewed Frameworks</strong></h4><p>I strict with my use case in my research and had to be more selective on frameworks. Still, I will add more points that need to be highlighted in each framework which may help readers out there.</p><h4><a href="https://www.cypress.io/"><strong>Cypress</strong></a></h4><p>End to end test automation framework written on Node.js. The unique architecture of running as the same loop of application creates greater access to testing elements and make fast &amp; efficient tests. Having a daily increasing community of users with the capability of Cypress framework.</p><p>Pros:</p><ul><li>The architecture of running the same loop as the testing application. Due to this having better access to simply everything in the application.</li><li>Fast execution</li><li>Higher consistency with tests</li><li>Easy debugging</li></ul><p>Cons:</p><ul><li>Not supporting Safari browser</li><li>Multiple tabs on the same browser not supported</li><li>The dashboard will be coming with a paid plan.</li><li>Larger projects may need commercial support</li></ul><h4><a href="https://pptr.dev/"><strong>Puppeteer</strong></a></h4><p>An open-source library developed by Google for test automation on the Chrome browser. Using the Devtools protocol for communication. As this only focussing on one browser properly, users get the advantage of implementing efficient and easy tests with better access to test modules.</p><p>Pros:</p><ul><li>Fast and reliable tests</li><li>Efficient tests with better access to modules</li><li>Higher user ratings on Git hub (70k stars)</li><li>No need of installing a separate server to run tests</li></ul><p>Cons:</p><ul><li>Only supporting Chrome browser</li><li>Still evolving (But…. having a great community and many supporting documentations :D)</li></ul><p>** Maybe a bit biased with Puppeteer. Used it as a POC for my own project and fallen in love with easy implementation and fast tests. Couldn’t find many cons except, the worst one that made me not to adapt, multiple browser support.</p><h4><a href="https://testproject.io/"><strong>Testproject</strong></a></h4><p>Cloud-hosted, open-source web and mobile test framework. This SaaS test framework is more into standard projects looking for direct test and easy management with standard use cases.</p><p>Pros:</p><ul><li>Cloud-hosted E2E framework</li><li>Fast and responsive support team</li><li>Test recorder help to generate test scripts easily</li><li>Cloud management of tests</li><li>Unlimited cloud space for tests (As per their support team)</li></ul><p>Cons:</p><ul><li>The testing team not having full access and management over test scripts due to this SaaS framework</li><li>More suitable for teams looking for standard use cases</li><li>Use Selenium for UI tests</li></ul><p>** I tried testproject locally as a trial with a sample use case. But seen inconsistency with test-project agents. Didn’t dig up deeply as not suited for my purpose. Comments are welcome with real users</p><h4><a href="https://nightwatchjs.org/"><strong>Nightwatch</strong></a></h4><p>New and evolving node.js framework which is using W3C WebDriver API for browser communication.</p><p>Pros:</p><ul><li>Evolving community</li><li>Higher git hub rating</li><li>Good documentation</li></ul><p>Cons:</p><ul><li>Not properly supporting typescript</li><li>Having Selenium protocol limitations/issues</li><li>Depending on the browser, need to install a specific web driver</li></ul><h4><a href="https://webdriver.io/"><strong>Webdriver I/O + Selenium</strong></a></h4><p>Web and mobile test automation framework. GUI tests mainly based on Selenium Protocol when supporting multiple browsers.</p><p>Pros:</p><ul><li>Enhancing support with other frameworks like “Puppeteer”</li><li>Proper end to end documentation</li><li>The WDIO Testrunner having synchronous behavior which makes test implementation easier.</li></ul><p>Cons:</p><ul><li>Need to have Selenium if it needs multiple browsers support</li><li>Underlying Selenium protocols may cause stability issues in CI</li><li>Lower git hub starts (6k only)</li></ul><h4><a href="https://playwright.dev/"><strong>Playwright</strong></a></h4><p>Microsoft’s web automation testing framework implemented top of Puppeteer with enhanced support for multiple browsers. Playwright is a Node.js library to automate multiple browsers with a single API. Use WebSocket thin client same as Puppeteer for communication.</p><p>Pros:</p><ul><li>Fast and efficient tests</li><li>Implemented with promise methods that make synchronous testing. Easy to write tests</li><li>Developed top of famous and growing “Puppeteer” while overcoming its’ limitations</li><li>Not using underlying Selenium protocols (JSON wire protocol)</li><li>A growing community with higher git hub stars (20k just for two years)</li></ul><p>Cons:</p><ul><li>Quite new and still evolving (Method chaining missing yet)</li><li>Can be challenging to adopt due to a lack of documentation</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2_HP1jlNtRUyEw87Z0_PRQ.png" /><figcaption>NPM Download trends &amp; Stats</figcaption></figure><h4>What should I choose?</h4><p>After the research on these test tools, ended up with Webdriver IO and Playwright. The main concern between the two was Webdriver IO using stable selenium while Playwright is quite challenging as it&#39;s really new with its tech stack.</p><p>I have already used Selenium for years with my previous projects and familiar with some common issues including stability concerns. POC with Playwright was exciting and finding how easy to write and manage with the framework. Still, I know there is a scary challenge of adopting a new framework. Compared to API tests, UI tests are always going to be the hardest ones to automate and so unpredictable in run time. That&#39;s why it will be scary while adopting a new framework that may have missing methods and limitations which is not yet identified.</p><p>Still, I was thinking of accepting the challenge and decided to adopt “<strong>Playwright</strong>”.</p><p><strong>Selected Tech Stack:</strong></p><ul><li><strong>Playwright</strong>: Automation Framework</li><li><strong>Jest</strong>: Test Runner</li><li>Typescript: Programming Language</li></ul><p>Note: Jest is a javascript testing framework developed and maintained by Facebook which is more similar to Jasmine. Jest is more advanced and provides more layers on top of Jasmine. Check references to find an interesting session on Jest and efficient test writing.</p><p>There will be more posts on the journey with “Playwright” which may help other risk-takers out there. Happy Coding! :D</p><h4>References</h4><ul><li><a href="https://jestjs.io/">Jest Docs &amp; Reference</a></li><li><a href="https://www.youtube.com/watch?v=cAKYQpTC7MA">Jest &amp; Delighful Javascript Testing</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e295945cc41e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are u bored ? Need an escape from typical daily routine ?]]></title>
            <link>https://dilshani.medium.com/are-u-bored-need-an-escape-from-typical-daily-routine-8cafa41f8fdd?source=rss-6ad23f43fbc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/8cafa41f8fdd</guid>
            <category><![CDATA[happiness]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[inspire]]></category>
            <category><![CDATA[boredom]]></category>
            <dc:creator><![CDATA[Dilshani Subasinghe]]></dc:creator>
            <pubDate>Tue, 28 Jul 2020 06:40:19 GMT</pubDate>
            <atom:updated>2020-07-28T06:42:41.503Z</atom:updated>
            <content:encoded><![CDATA[<h3>Are u bored ? Need an escape from typical daily routine ?</h3><p>Hi there,</p><p>Today I will not be writing any technical articles based on my field. Instead wanted to write about best things I have adopted in up &amp; downs faced lately in my life.</p><p>I was bored.</p><p>My mind was tired of my daily routine of going to office, working, lunch, meetings, coming back home, dinner &amp; sleep. After few days, it even whisper the next event on my schedule and predicted what was going to happen in next few minutes. Most of the times prediction was accurate and I was bored that much.</p><p>I tried going for shopping without having any specific thing to buy. Don’t worry! It doesn’t matter what is the crisis i’m involved in, always I have something to buy. But that was temporary happiness. I was so excited &amp; happy while shopping and once back in home, its’ just gone!</p><p>Lately I was going through my photo gallery and found out some of amazing memories I have. Then I tried to figure out the ways I can be more excited about my day and work. So here I have listed down the ideas/things I have done to getting out of boredom. Comments are always welcome to grow my list &amp; find out new exciting ways :)</p><ol><li>Try out activities out of comfort zone</li></ol><p>May sounds like crazy for some people. First impression of this point can be already depressed you. I was in the same boat. But trust me, u will amazed with the excitement you get once overcome your fears. And the confidence you gain through it.</p><p>Here I list down few of activities I have done. It totally depend on your own own preferences and your own limits need to crush.</p><ul><li>Kayaking</li></ul><p>I wasn’t a good swimmer and was afraid of Kayaking since a child. Got a chance to force my self on this as an office event. I choose back seat on the boat as first mistake and it was too tiring right after 10 mins.</p><p>Obviously we finished off as the last team and still it was fun :D</p><ul><li>Painting Tshirts</li></ul><p>Actually I am terrible at drawing/painting. But I found out that I can be more creative with simple designs which can be easily draw. Lucky to get so many compliments and found out new side on me as well.</p><ul><li>Watching horror movies</li></ul><p>This experience was purely mistake in the first place. I wasn’t thinking about the movie or content as it was team outing. Right after 10 mins of the movie, I was getting feeling like this is not my type movie. But I was forced to watch it as I couldn’t leave in the middle. I still remember some of my colleagues screaming while some others making funny noises for scary moments. At the end of the day, it was funny torture and I check out first horror movie I have ever watched until the end. Still love the memory!</p><p>2. Put down all your devices &amp; find some quality time alone with yourself</p><p>With technology, we used to bond with devices rather than human beings. Daily office work will be mostly with laptops and thousand variations of electronic screens while free time goes for phone.</p><p>Find some specific time to get away from all those devices. I choose few days to get away from phone and it made lot of burden to push aside. Of course! u may have to make sure that your loved ones know ur plans! Otherwise u will end up with thousand calls &amp; angry/worried texts ;)</p><p>First you can start with one or two hours. Later you can extend more and find out so many things you can do without electronic devices.</p><p>Within this time, I used to think about my life. Make plans for next few days. Find out new hobbies for me etc.</p><p>3. Doing work outs</p><p>I was so lazy on doing work outs. Only focussed on diet and prayed for miracles. But with the inspiration of my loved ones, I started doing workouts for 30 mins everyday! That was one of the best thing adopted in Covid-19 period.</p><p>Doing work outs are not just for body, but also for mind. Once your body is active, it also helps to stimulate your mind as well. I have personally experienced how my mind get calmed &amp; energetic after workouts.</p><p>Once Im exhausted with stress/decisions, push my self for doing small workouts/jogging to clear my mind first. It works for me :) All the time!</p><p>4. Travelling</p><p>Travelling is a best therapy if u are in to that. I mostly prefer alone places rather than crowded areas. So I will be picky once it comes to choosing places for travel. Spending two or three days in a calm &amp; quiet place fuel me for next few months to run.</p><p>It doesn’t need to be long vacation or something. Just go somewhere close to you if you are struggling with time for allocating travel. Just breath and spend some quality time there! I found it useful for me :)</p><p>5. Make time with your loved ones</p><p>Once you are busy with your life, you may not have enough time to allocate for your family, friends or cousins. It may feel like its’ hard to manage all those relationships along with busy life. It only need effort. If you really need to find some time off the table, you can actually do that.</p><p>Find a time to connect with your school/university colleagues or cousins and check out how their life goes on. It doesn’t have to be a call/text in need of help. But it will help you to remind your old funny memories together and have interesting conversations with people you adored within your life.</p><p>6. Small things matters</p><p>You may don’t have to waste lot of money to find your excitement &amp; happiness. It always start with small thing. It may be just away from one phone call, writing a blog, working in an amazing craft in your mind, cooking a new recipe or anything you can come up with.</p><p>Just try to spice your day with small things. While I commute in bus, used to meet nice bus captain who greet and wish every one in the morning while get in. And also while get off, she used to wave and wish for the day. That was enough for me to start the day with a pleasant smile!</p><p>Im bit nervous on writing life experiences in blog as those never will be direct Q&amp;A or applicable for everyone like technical stuff I used to write. I totally understand and believe that everyone has their own and unique journey. But I used to grab so many interesting advises &amp; motivation through videos, blogs and books which people have shared with their experiences. Hope this will be a blessing for someone seek for the motivation!</p><p>Stay happy &amp; safe :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cafa41f8fdd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create Excel sheet with Test Results (Java + Apache POI + TestNG + Cucumber)]]></title>
            <link>https://dilshani.medium.com/create-excel-sheet-with-test-results-java-apache-poi-testng-cucumber-f330e0eb9487?source=rss-6ad23f43fbc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f330e0eb9487</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[cucumber]]></category>
            <category><![CDATA[apache-poi]]></category>
            <category><![CDATA[excel]]></category>
            <dc:creator><![CDATA[Dilshani Subasinghe]]></dc:creator>
            <pubDate>Fri, 01 Nov 2019 08:38:38 GMT</pubDate>
            <atom:updated>2019-11-01T08:38:38.042Z</atom:updated>
            <content:encoded><![CDATA[<p>This a quick guide on writing test results in excel sheet at the end of your automation testing.</p><p><strong>Use Case:</strong> Writing one cucumber test scenario test results in excel sheet</p><p><strong>Tech Stack:</strong></p><ul><li>TestNG Automation Framework With Cucumber</li><li>Java 8</li><li>Maven</li><li>Rest Assured for API test automation</li><li>Selenium for UI test automation</li></ul><p><strong>Integration of Excel Sheet Output for Automation Tests</strong></p><p><strong>Apache POI:</strong> This is an open source project run by the Apache Software Foundation, and previously a sub-project of the Jakarta Project, provides pure Java libraries for reading and writing files in Microsoft Office formats, such as Word, PowerPoint and Excel.</p><p><strong>Maven Dependancy:</strong></p><p>Include following dependency in POM.xml file</p><pre>&lt;dependency&gt;<br>    &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;<br>    &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;<br>    &lt;version&gt;3.17&lt;/version&gt;<br>&lt;/dependency&gt;</pre><p>Note: Version can be differ with latest updates</p><p><strong>Implementation</strong></p><p>I have maintained separate methods for managing excel sheet within the same java class (“WriteInExcel”).</p><ol><li>Create a file: This will create excel file in the given location in local machine.</li></ol><pre>public static void createAFile() throws IOException {<br>    File file = new File(&quot;<strong>/Users/dilshani/**/testResult.xlsx</strong>&quot;);<br>    boolean exists = file.exists();<br>    if(exists){<br>    //<em>TODO: Implement this fragment when you are working with few work sheet or while checking for file existence.<br>        </em>// Not required in my use case<br>    }else {<br>        FileOutputStream newFile = new FileOutputStream(&quot;testResult.xlsx&quot;);<br>        TestResultManager.<em>setFileOutputStream</em>(newFile);<br>    }</pre><p>File name should be altered. And implement file existence check according to the use case. I didn’t want to use for my use case.</p><p>2. Create Work Book</p><pre>public static void createWorkBook(){<br>        Workbook workbook = new XSSFWorkbook();<br>        CreationHelper createHelper = workbook.getCreationHelper();<br>        TestResultManager.setWorkBook(workbook);<br>    }</pre><p>3. Write data in the sheet:</p><pre>public static void writeDataInSheet(String sheetName, Map&lt;String, Map&lt;String,Map.Entry&lt;String,String&gt;&gt;&gt; data) {<br><br>    Workbook workbook = TestResultManager.<em>getWorkbook</em>();<br><br>    Sheet sheet = workbook.createSheet(sheetName);<br><br>    // Create a Font for styling header cells<br>    Font headerFont = workbook.createFont();<br>    headerFont.setBold(true);<br>    headerFont.setFontHeightInPoints((short) 14);<br>    headerFont.setColor(IndexedColors.<em>RED</em>.getIndex());<br><br>    // Create a CellStyle with the font<br>    CellStyle headerCellStyle = workbook.createCellStyle();<br>    headerCellStyle.setFont(headerFont);<br>    // Create a Row<br>    Row headerRow = sheet.createRow(0);<br><br>    // Create cells<br>    for (int i = 0; i &lt; <em>columns</em>.length; i++) {<br>        Cell cell = headerRow.createCell(i);<br>        cell.setCellValue(<em>columns</em>[i]);<br>        cell.setCellStyle(headerCellStyle);<br>    }<br><br>    //write data<br>    int rowNum = 1;<br>    for (Map.Entry&lt;String, Map&lt;String, Map.Entry&lt;String, String&gt;&gt;&gt; result : data.entrySet()) {<br>        Row row = sheet.createRow(rowNum++);<br>        String type = result.getKey();<br>        row.createCell(0).setCellValue(type);<br>        for (Map.Entry&lt;String, Map.Entry&lt;String, String&gt;&gt; sensor : result.getValue().entrySet()) {<br>            Row row2 = sheet.createRow(rowNum++);<br>            row2.createCell(1)<br>                    .setCellValue(sensor.getKey());<br>            row2.createCell(2)<br>                    .setCellValue(sensor.getValue().getKey());<br>            row2.createCell(3)<br>                    .setCellValue(sensor.getValue().getValue());<br>            // System.out.println(&quot;Type --&gt;&quot;+type + &quot; Sesnor --&gt;&quot; + sensor.getKey()+ &quot; Result --&gt; &quot;+ sensor.getValue());<br>        }<br>    }<br><br>    // Resize all columns to fit the content size<br>    for (int i = 0; i &lt; <em>columns</em>.length; i++) {<br>        sheet.autoSizeColumn(i);<br>    }<br><br>    TestResultManager.<em>setWorkBook</em>(workbook);<br><br>}</pre><p>This method will take sheet name and data set that should be writing to the exact sheet as parameters. Adding to rows in sheet will be differ with the data set you are planning to pass.</p><p>I maintain One class to keep getters and setters for few variables. As Im planning to add few sheets in to same work book in different tests, thought of maintaining few variables in separate class (Like workbook reference)</p><pre>public class TestResultManager {<br>    private static Workbook <em>workbook</em>;<br><br>    private static FileOutputStream <em>fileOutputStream</em>;<br><br>    public static FileOutputStream getFileOutputStream() {<br>        return <em>fileOutputStream</em>;<br>    }<br>    public static void setFileOutputStream(FileOutputStream fileOutputStream) {<br>        TestResultManager.<em>fileOutputStream </em>= fileOutputStream;<br>    }<br><br>    public static void setWorkBook(Workbook workbook){<br>        TestResultManager.<em>workbook</em>=workbook;<br>    }<br>    public static Workbook getWorkbook(){<br>        return <em>workbook</em>;<br>    }<br><br>}</pre><p>Above is enough for the java implementation of creating Excel file for test results. As I have use this in Cucumber Automation Test framework following steps added who interested to know how to have multiple sheets within same excel file for different tests.</p><p><strong>Cucumber Feature structure</strong></p><p>In one feature I have two steps for one test. Even though it’s better to have different scenarios for test cases, due to limitation of Cucumber had to implement all testing cases for one round under one feature.</p><pre>    When I give the file of all available sensors for &quot;<strong>databank-sensor</strong>&quot; from the location &quot;<strong>/Users/dilshani/**/sensor.json</strong>&quot; with &quot;<strong>10</strong>&quot; limitation in &quot;<strong>prod</strong>&quot; with &quot;<strong>1440</strong>&quot; resolution</pre><pre>    Then I should get test results on comparing with raw data on &quot;<strong>databank-sensor</strong>&quot;</pre><p><strong><em>Test case explanation</em></strong>: In my scenario, I will be calling two different APIs and get data accordingly. Then validate the response to make sure that those are mapping each other with given conditions.</p><p>I passing JSON file (location “<strong>/Users/dilshani/**/sensor.json</strong>”)with all sensors and will be taking random number of sensors (“<strong>10</strong>” limitation ) and make two calls for each with given resolution (“<strong>1440</strong>” resolution).</p><p>After this test all result will be written to excel sheet in second step.</p><p>I have three scenarios like this. So I have one feature including all testing scenarios.</p><pre>@DataValidationAll<br>Feature: Verify data matching with Data Bank<br>  As an user of Data Bank<br>  I want to check Data bank data mapping with Raw Data<br><br>  Scenario: Validate Data Bank &amp; Band at once<br>    When I give the file of all available sensors for &quot;<strong>databank-sensor</strong>&quot; from the location &quot;<strong>/Users/dilshani/**/sensor.json</strong>&quot; with &quot;<strong>1</strong>&quot; limitation in &quot;<strong>prod</strong>&quot; with &quot;<strong>1440</strong>&quot; resolution<br>    Then I should get test results on comparing with raw data on &quot;<strong>databank-sensor</strong>&quot;<br>    When I give the file of all available sensors for &quot;<strong>databank-dma</strong>&quot; from the location &quot;<strong>/Users/dilshani/**/sensor.json</strong>&quot; with &quot;<strong>0</strong>&quot; limitation in &quot;<strong>prod</strong>&quot; with &quot;<strong>1440</strong>&quot; resolution<br>    Then  I should get test results on comparing with raw data on &quot;<strong>databank-dma</strong>&quot;<br>    When I give the file of all available sensors for &quot;<strong>databand</strong>&quot; from the location &quot;<strong>/Users/dilshani/**/sensor.json</strong>&quot; with &quot;<strong>1</strong>&quot; limitation in &quot;<strong>prod</strong>&quot; with &quot;<strong>1440</strong>&quot; resolution<br>    Then  I should get test results on comparing with raw data on &quot;<strong>databand</strong>&quot;</pre><p>End of feature, there will be one excel file with three sheets with results for these three scenarios.</p><p><strong>Feature implementation in Java:</strong></p><p>Using Service Hooks in Cucumber to create file, work book and close the file.</p><p>Before Hook:</p><pre>@Before<em><br></em>public void initializeTest(Scenario scenario) throws IOException, InvalidFormatException {</pre><pre>    <em>createAFile</em>();<br>    <em>createWorkBook</em>();<br><br>}</pre><p>After Hook:</p><pre>@After<em><br></em>public void endTest(Scenario scenario) {<br><br>    try {<br>        WriteInExcel writeInExcel = new WriteInExcel();<br>        TestResultManager testResultManager = new TestResultManager();<br>        writeInExcel.<em>writeToFile</em>(testResultManager.<em>getFileOutputStream</em>());<br>    } catch (IOException e) {<br>        e.printStackTrace();<br>    }<br>}</pre><p>Within tests, use second step after main testing step to write test results in the excel sheet.</p><pre>@Then(&quot;^I should get test results on comparing with raw data on \&quot;([^\&quot;]*)\&quot;$&quot;)<br>public void i_should_see_same_data_in_databank(String type) throws IOException {<br>    try{<br>           if(type.equals(&quot;databank-sensor&quot;)){<br>               <em>writeDataForSensorLevelDataBank</em>();<br>           }else if(type.equals(&quot;databank-dma&quot;)){<br>               <em>writeDataForDMALevelDataBank</em>();<br>           } else if(type.equals(&quot;databand&quot;)){<br>               <em>writeDataForDMALevelDataBand</em>();<br>           }<br>       } catch (InvalidFormatException e) {<br>           e.printStackTrace();<br>       }</pre><p>According to the testing scenario it will navigate to three different methods. This can be implement with one method.</p><pre>public static void writeDataForDMALevelDataBank() throws IOException, InvalidFormatException {<br>    //For output<br>    WriteInExcel writeInExcel = new WriteInExcel();<br>    writeInExcel.<em>writeDataInSheet</em>(&quot;DMALevel&quot;,<em>getFinalResult</em>());<br>}</pre><p>According to the scenario, will pass the result set and sheet name to the method which will write data in sheet.</p><p><strong>Limitations:</strong></p><ul><li>As I wanted to have different sheets for different scenarios, tried to implement exact use case. It was failed due to the limitation of Cucumber. Cucumber does not support feature level listers/hooks. Only support scenario level hooks. (Ref: <a href="https://github.com/cucumber/cucumber-jvm/issues/515">https://github.com/cucumber/cucumber-jvm/issues/515</a>). Hence implemented all scenarios within the same feature sake of execution.</li></ul><p>Thanks for reading and enjoy the fun of mixing few technologies together and learning a lot at once. Cheers for all techies out there !!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f330e0eb9487" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rest Assured — URL encoding]]></title>
            <link>https://dilshani.medium.com/rest-assured-url-encoding-fd4c6261d6?source=rss-6ad23f43fbc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd4c6261d6</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[restassured]]></category>
            <dc:creator><![CDATA[Dilshani Subasinghe]]></dc:creator>
            <pubDate>Fri, 08 Mar 2019 03:02:42 GMT</pubDate>
            <atom:updated>2020-10-13T11:29:48.385Z</atom:updated>
            <content:encoded><![CDATA[<h3>Rest Assured — URL encoding</h3><p>When “RequestSpecification” for the HTTP request, you may forget to check URL encoding. That may affect the path you need to invoke.</p><p>Example:</p><p>You need to invoke:</p><pre>http://www.mocky.io/v2/5c78ed70300000a42d49b04d?<a href="/service/mailto:user=qavisenti@gmail.com">user=qavisenti@gmail.com</a>&amp;groupby=zone&amp;displaygroup=smart</pre><p>By default, URL encoding enabled with RequestSpecification requests and will be the request as follows:</p><pre>http://www.mocky.io/v2/5c78ed70300000a42d49b04d?user=qavisenti%40gmail.com&amp;groupby=zone&amp;displaygroup=smart</pre><p>Hence disable URL encoding:</p><pre>RestAssured.<em>baseURI </em>= &quot;http://www.mocky.io/v2/5c78ed70300000a42d49b04d&quot;;</pre><pre>RestAssured.<em>urlEncodingEnabled </em>= false;</pre><pre>RequestSpecification httpRequest = RestAssured.<em>given</em>().<br>        queryParam(&quot;user&quot;,&quot;qavisenti@gmail.com&quot;).<br>        queryParam(&quot;groupby&quot;,&quot;zone&quot;).<br>        queryParam(&quot;displaygroup&quot;,&quot;smart&quot;).<br>        request().log().all();</pre><pre>Response response = httpRequest.request(Method.<em>GET</em>);</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd4c6261d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rest Assured with TestNG]]></title>
            <link>https://dilshani.medium.com/rest-assured-with-testng-5365180baf67?source=rss-6ad23f43fbc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/5365180baf67</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[restassured]]></category>
            <category><![CDATA[rest-api-testing]]></category>
            <dc:creator><![CDATA[Dilshani Subasinghe]]></dc:creator>
            <pubDate>Mon, 04 Mar 2019 03:04:54 GMT</pubDate>
            <atom:updated>2019-03-04T03:04:54.456Z</atom:updated>
            <content:encoded><![CDATA[<p>I was working with a test automation framework with cucumber, selenium and TestNG.</p><p>According to the requirement, had to have hybrid test architecture to cater to use cases. Hence decided to do REST API testing with Rest Assured.</p><p>Framework:</p><ul><li>Maven based Java project</li><li>BDD method used via Cucumber</li><li>Selenium for automating UI use cases</li><li>TestNG used to run tests</li></ul><p>Requirement:</p><ul><li>Integrating REST API related automation tests</li></ul><p>Solution:</p><ul><li>Integrate Rest Assured Library and using it within the framework</li></ul><p><strong>Maven Dependency</strong></p><pre>&lt;dependency&gt;<br>    &lt;groupId&gt;io.rest-assured&lt;/groupId&gt;<br>    &lt;artifactId&gt;json-schema-validator&lt;/artifactId&gt;<br>    &lt;version&gt;3.3.0&lt;/version&gt;<br>&lt;/dependency&gt;</pre><p>Remember to add &lt;scope&gt;test&lt;/scope&gt; within above dependency, if you want to limit your scope.</p><p><strong>Mock REST API</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mJgKNf-4PQ1A9wOS0MY3Fw.png" /></figure><p><strong>Test Class Implementation</strong></p><p>I have used TestNG to run cucumber classes as follows:</p><pre>@BeforeClass(alwaysRun = true)<br>    public void setUpClass() throws Exception {<br>        testNGCucumberRunner = new TestNGCucumberRunner(this.getClass());<br>    }<br><br>    @Test(groups = &quot;cucumber&quot;, description = &quot;Runs Cucumber Feature&quot;, dataProvider = &quot;features&quot;)<br>    public void feature(CucumberFeatureWrapper cucumberFeature) {<br>        testNGCucumberRunner.runCucumber(cucumberFeature.getCucumberFeature());<br>    }<br><br>    @DataProvider<br>    public Object[][] features() {<br>        return testNGCucumberRunner.provideFeatures();<br>    }<br><br>    @AfterClass(alwaysRun = true)<br>    public void tearDownClass()  {<br>        testNGCucumberRunner.finish();<br>        Reporter.<em>loadXMLConfig</em>(new File(FileReaderManager.<em>getInstance</em>().getConfigReader().getReportConfigPath()));<br>    }<br>}</pre><p>According to my framework, I will be writing a test case inside of cucumber step definitions. If you need a reference for direct integration of Rest Assured with TestNG to follow these [2, 3].</p><p><strong>Test Class With Rest Assured</strong></p><pre>//API URL<br>RestAssured.<em>baseURI </em>= &quot;http://www.mocky.io/v2/5c78ed70300000a42d49b04d&quot;;<br><br>//HTTP request<br>RequestSpecification httpRequest = RestAssured.<em>given</em>();</pre><pre>//Getting response <br>Response response = httpRequest.request(Method.<em>GET</em>);<br>//Response response = httpRequest.request(Method.GET, &quot;/city&quot;);<br><br>//Getting response body to verify/assert<br>String responseBody = response.getBody().asString();<br>System.<em>out</em>.println(&quot;Response Body is =&gt;  &quot; + responseBody);<br>System.<em>out</em>.println(response.getStatusCode());</pre><p>For more functionalities in REST Assured and easy validations for JSON responses please refer this [1].</p><p>Enjoy resting more with REST Assured Testing ;)</p><p><strong>References</strong>:</p><p>[1] <a href="https://github.com/rest-assured/rest-assured/wiki/Usage">https://github.com/rest-assured/rest-assured/wiki/Usage</a></p><p>[2] <a href="https://www.toolsqa.com/rest-assured/configure-eclipse-with-rest-assured/">https://www.toolsqa.com/rest-assured/configure-eclipse-with-rest-assured/</a></p><p>[3] <a href="https://techbeacon.com/app-dev-testing/efficient-api-testing-how-get-started-rest-assured">https://techbeacon.com/app-dev-testing/efficient-api-testing-how-get-started-rest-assured</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5365180baf67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Java] Reverse content in brackets]]></title>
            <link>https://dilshani.medium.com/java-reverse-content-in-brackets-1cf186a8606e?source=rss-6ad23f43fbc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cf186a8606e</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[recursion]]></category>
            <dc:creator><![CDATA[Dilshani Subasinghe]]></dc:creator>
            <pubDate>Tue, 02 Oct 2018 06:16:42 GMT</pubDate>
            <atom:updated>2018-10-02T06:16:42.058Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Question:</strong></p><p>Input String may have content inside of brackets. All the content in brackets should be in reversed order.</p><p>Ex:</p><ul><li>Input — “Hello(Welcome)” Outcome — “HelloomocleW”</li><li>Input — “Hello(Wel(co)me)” Outcome — “HelloomcoleW”</li></ul><p><strong>Assumptions:</strong></p><ul><li>Brackets will be in the standard way (Which means those not gonna messes up the content. All open brackets will have close brackets)</li></ul><p><strong>Answer:</strong></p><p>There will be several answers which we can come up with good answers. I came up with an answer with a Recursive method call.</p><pre>import java.util.Stack;<br><br>public class Solution {<br>    static String <em>strFinal </em>= &quot;&quot;;<br>    static  Integer <em>reversedInteger </em>;<br>    public static void main(String[] args) {<br>        String result = <em>reversedString</em>(&quot;Hello(We(lc)ome)&quot;);<br>        System.<em>out</em>.println(result);<br>    }<br>    static String reversedString (String input){<br>        StringBuilder s = new StringBuilder(input);<br>        for (int i=0; i&lt;s.length(); i++) {<br>            if(s.charAt(i) == &#39;(&#39;) {<br>                <em>strFinal </em>= <em>strFinal </em>+ <em>stackReverse</em>(input,i+1);<br>                i = <em>reversedInteger</em>;<br>            }else if (s.charAt(i) == &#39;)&#39;);<br>            else {<br>                <em>strFinal </em>= <em>strFinal</em>+ s.charAt(i);<br>            }<br>        }<br>        return <em>strFinal</em>;<br>    }<br><br>    static String stackReverse (String S, Integer index){<br>        Stack&lt;Character&gt; temporarystack = new Stack();<br>        String reversedStringByStack = &quot;&quot;;<br>        for (int i=index; i&lt;S.length(); i++) {<br>            if (S.charAt(i) == &#39;(&#39;) {<br>                StringBuilder reversed = new StringBuilder(<em>stackReverse</em>(S, i+1));<br>                for(int k =0; k&lt;reversed.length();k++){<br>                    temporarystack.push(reversed.charAt(k));<br>                }<br>                i = <em>reversedInteger</em>;<br>            }<br>            else if (S.charAt(i) == &#39;)&#39;) {<br>                <em>reversedInteger </em>= i;<br>                break;<br>            } else {<br>                temporarystack.push(S.charAt(i));<br>            }<br>        }<br>        while (!temporarystack.isEmpty()){<br>            reversedStringByStack = reversedStringByStack + temporarystack.pop();<br>        }<br>        return reversedStringByStack;<br>    }<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cf186a8606e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When you should consider WSO2 ESB]]></title>
            <link>https://dilshani.medium.com/when-you-should-consider-wso2-esb-5dc786cff814?source=rss-6ad23f43fbc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dc786cff814</guid>
            <category><![CDATA[capabilities]]></category>
            <category><![CDATA[wso2esb]]></category>
            <category><![CDATA[esb]]></category>
            <category><![CDATA[wso2]]></category>
            <dc:creator><![CDATA[Dilshani Subasinghe]]></dc:creator>
            <pubDate>Thu, 03 Aug 2017 18:53:00 GMT</pubDate>
            <atom:updated>2017-08-04T04:49:58.807Z</atom:updated>
            <content:encoded><![CDATA[<p>WSO2’s cloud-enabled, 100% open source enterprise service bus (ESB) [1] is a standards-based messaging engine that provides the value of messaging without writing code. It provides data integration capabilities, eliminating the need to use a separate data services server for your integration processes.</p><p>In general, ESB has to offer a wide range of integration capabilities from simple message routing to complicated systems which use integrated solutions. When you find when we should use WSO2 ESB, you may find main capabilities as follows;</p><ul><li><strong>Message mediation</strong>: Manipulate the message content, direction,<br>destination, and protocols with message flow configurations.</li><li><strong>Service virtualization</strong>: Wrap existing systems or services with new<br>service interfaces.</li><li><strong>Protocol conversion</strong>: Bridge different protocols. For example, JMS<br>to HTTP.</li><li><strong>Support for Enterprise Integration Patterns (EIP</strong>) [2]</li><li><strong>Quality of service</strong>: Apply security, throttling, and caching.</li><li><strong>Connecting to legacy and proprietary systems:</strong> Business adapters,<br>including SAP, FIX, and HL7.</li><li><strong>Connectors to cloud services and APIs</strong>: Salesforce, Twitter, PayPal,<br>and many more.</li><li><strong>Configuration driven</strong>: Most functionalities are driven by<br>configuration but not code.</li><li><strong>Extensible:</strong> There are extension points that can be used to<br>integrate with any custom protocol or proprietary system.</li></ul><p>WSO2 ESB considered as light weight, stateless integration bus which can be a good competitor in open source environment. Please refer following links to find more interesting capabilities of WSO2 ESB.</p><p>[1] <a href="http://wso2.com/products/enterprise-service-bus/">http://wso2.com/products/enterprise-service-bus/</a></p><p>[2] <a href="https://docs.wso2.com/display/IntegrationPatterns/Enterprise+Integration+Patterns+with+WSO2+ESB">https://docs.wso2.com/display/IntegrationPatterns/Enterprise+Integration+Patterns+with+WSO2+ESB</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dc786cff814" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[WSO2] Clustering EI Analytics Profile]]></title>
            <link>https://dilshani.medium.com/wso2-clustering-ei-analytics-profile-91819a90ab7a?source=rss-6ad23f43fbc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/91819a90ab7a</guid>
            <category><![CDATA[wso2-ei]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[clustering]]></category>
            <category><![CDATA[wso2]]></category>
            <dc:creator><![CDATA[Dilshani Subasinghe]]></dc:creator>
            <pubDate>Sun, 23 Apr 2017 06:08:26 GMT</pubDate>
            <atom:updated>2017-04-23T06:52:06.777Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*6QNc3-7ULpW6hJfIEShh2Q.jpeg" /></figure><h3><strong>Setup</strong></h3><ul><li>Enterprise Integrator 6.1.0</li><li>Analytics profile configure with Oracle 12 c database</li><li>Analytics two nodes in separate instances</li></ul><h3>Data source Configuration</h3><ol><li>Install Oracle database server.</li><li>Create databases in Oracle.</li></ol><p>Create</p><ul><li>REGISTRY database (ei610regana),</li><li>USER MANAGEMENT database (),</li><li>WSO2_ANALYTICS_EVENT_STORE_DB (anaevesto61),</li><li>WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB (anaprodstor61) and</li><li>Two carbon databases (wso2carbonana1, wso2carbonana2) as we need 2 local databases for analytics nodes.</li></ul><pre>drop user ei610regana cascade;<br>Create user ei610regana identified by ei610regana account unlock;<br>grant connect to ei610regana;<br>grant resource, create session, dba to ei610regana;<br>grant unlimited tablespace to ei610regana;<br>grant create table to ei610regana;<br>commit;</pre><pre>drop user ei610user cascade;<br>Create user ei610user identified by ei610user account unlock;<br>grant connect to ei610user;<br>grant resource, create session, dba to ei610user;<br>grant unlimited tablespace to ei610user;<br>grant create table to ei610user;<br>commit;</pre><pre>drop user anaevesto61 cascade;<br>Create user anaevesto61 identified by anaevesto61 account unlock;<br>grant connect to anaevesto61;<br>grant resource, create session, dba to anaevesto61;<br>grant unlimited tablespace to anaevesto61;<br>grant create table to anaevesto61;<br>commit;</pre><pre>drop user anaprodstor61 cascade;<br>Create user anaprodstor61 identified by anaprodstor61 account unlock;<br>grant connect to anaprodstor61;<br>grant resource, create session, dba to anaprodstor61;<br>grant unlimited tablespace to anaprodstor61;<br>grant create table to anaprodstor61;<br>commit;</pre><pre>drop user wso2carbonana1 cascade;<br>Create user wso2carbonana1 identified by wso2carbonana1 account unlock;<br>grant connect to wso2carbonana1;<br>grant resource, create session, dba to wso2carbonana1;<br>grant unlimited tablespace to wso2carbonana1;<br>grant create table to wso2carbonana1;<br>commit;</pre><pre>drop user wso2carbonana2 cascade;<br>Create user wso2carbonana2 identified by wso2carbonana2 account unlock;<br>grant connect to wso2carbonana2;<br>grant resource, create session, dba to wso2carbonana2;<br>grant unlimited tablespace to wso2carbonana2;<br>grant create table to wso2carbonana2;<br>commit;</pre><h3><strong>Configure data source related configs in EI Analytic profile</strong></h3><p>3. Download Oracle JDBC driver. Add driver jar in to lib folder ($EI_HOME/lib)</p><p>4. Add carbon data source details in to master-datasources.xml ($EI_HOME/wso2/analytics/conf/datasources)</p><p>Replace &lt;<strong>ip &gt;</strong>with<strong> </strong>instance IP of which installed oracle server.</p><pre>&lt;datasources&gt;<br>       &lt;datasource&gt;<br>            &lt;name&gt;WSO2_CARBON_DB&lt;/name&gt;<br>            &lt;description&gt;The datasource used for registry and user manager&lt;/description&gt;<br>            &lt;jndiConfig&gt;<br>                &lt;name&gt;jdbc/WSO2CarbonDB&lt;/name&gt;<br>            &lt;/jndiConfig&gt;<br>            &lt;definition type=&quot;RDBMS&quot;&gt;<br>                &lt;configuration&gt;<br>                    &lt;url&gt;jdbc:oracle:thin:<a href="http://twitter.com/192">@</a>&lt;<strong>ip</strong>&gt;:1521/pdbora12c&lt;/url&gt;<br>                    &lt;username&gt;wso2carbonana1&lt;/username&gt;<br>                    &lt;password&gt;wso2carbonana1&lt;/password&gt;<br>                    &lt;driverClassName&gt;oracle.jdbc.driver.OracleDriver&lt;/driverClassName&gt;<br>                    &lt;maxActive&gt;50&lt;/maxActive&gt;<br>                    &lt;maxWait&gt;60000&lt;/maxWait&gt;<br>                    &lt;testOnBorrow&gt;true&lt;/testOnBorrow&gt;<br>                    &lt;validationQuery&gt;SELECT 1&lt;/validationQuery&gt;<br>                    &lt;validationInterval&gt;30000&lt;/validationInterval&gt;<br>                    &lt;defaultAutoCommit&gt;false&lt;/defaultAutoCommit&gt;<br>               &lt;/configuration&gt;<br>            &lt;/definition&gt;<br>        &lt;/datasource&gt;</pre><pre>&lt;datasource&gt;<br>            &lt;name&gt;WSO2_REG_DB&lt;/name&gt;<br>            &lt;description&gt;The datasource used for registry and user manager&lt;/description&gt;<br>            &lt;jndiConfig&gt;<br>                &lt;name&gt;jdbc/WSO2RegDB&lt;/name&gt;<br>            &lt;/jndiConfig&gt;<br>            &lt;definition type=&quot;RDBMS&quot;&gt;<br>                &lt;configuration&gt;<br>                    &lt;url&gt;jdbc:oracle:thin:<a href="http://twitter.com/192">@</a>&lt;<strong>ip</strong>&gt;:1521/pdbora12c&lt;/url&gt;<br>                    &lt;username&gt;ei610regana&lt;/username&gt;<br>                    &lt;password&gt;ei610regana&lt;/password&gt;<br>                    &lt;driverClassName&gt;oracle.jdbc.driver.OracleDriver&lt;/driverClassName&gt;<br>                    &lt;maxActive&gt;50&lt;/maxActive&gt;<br>                    &lt;maxWait&gt;60000&lt;/maxWait&gt;<br>                    &lt;testOnBorrow&gt;true&lt;/testOnBorrow&gt;<br>                    &lt;validationQuery&gt;SELECT 1&lt;/validationQuery&gt;<br>                    &lt;validationInterval&gt;30000&lt;/validationInterval&gt;<br>                    &lt;defaultAutoCommit&gt;false&lt;/defaultAutoCommit&gt;<br>                &lt;/configuration&gt;<br>            &lt;/definition&gt;<br>        &lt;/datasource&gt;</pre><pre>&lt;datasource&gt;<br>            &lt;name&gt;WSO2_UM_DB&lt;/name&gt;<br>            &lt;description&gt;The datasource used for registry and user manager&lt;/description&gt;<br>            &lt;jndiConfig&gt;<br>                &lt;name&gt;jdbc/WSO2UMDB&lt;/name&gt;<br>            &lt;/jndiConfig&gt;<br>            &lt;definition type=&quot;RDBMS&quot;&gt;<br>            &lt;configuration&gt;<br>                   &lt;url&gt;jdbc:oracle:thin:<a href="http://twitter.com/192">@</a>&lt;<strong>ip</strong>&gt;:1521/pdbora12c&lt;/url&gt;<br>                   &lt;username&gt;ei610user&lt;/username&gt;<br>                   &lt;password&gt;ei610user&lt;/password&gt;<br>                   &lt;driverClassName&gt;oracle.jdbc.driver.OracleDriver&lt;/driverClassName&gt;<br>                   &lt;maxActive&gt;50&lt;/maxActive&gt;<br>                   &lt;maxWait&gt;60000&lt;/maxWait&gt;<br>                   &lt;testOnBorrow&gt;true&lt;/testOnBorrow&gt;<br>                   &lt;validationQuery&gt;SELECT 1 FROM DUAL&lt;/validationQuery&gt;<br>                   &lt;validationInterval&gt;30000&lt;/validationInterval&gt;<br>            &lt;/configuration&gt;<br>        &lt;/definition&gt;<br>&lt;/datasource&gt;<br>&lt;/datasources&gt;</pre><p>5. Add WSO2_ANALYTICS_EVENT_STORE_DB and WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB data source details in to analytics-datasources.xml ($EI_HOME/wso2/analytics/conf/datasources).</p><p>Replace &lt;<strong>ip &gt;</strong>with<strong> </strong>instance IP of which installed oracle server.</p><pre>&lt;datasource&gt;<br>            &lt;name&gt;WSO2_ANALYTICS_EVENT_STORE_DB&lt;/name&gt;<br>            &lt;description&gt;The datasource used for analytics record store&lt;/description&gt;<br>            &lt;definition type=&quot;RDBMS&quot;&gt;<br>                &lt;configuration&gt;<br>                    &lt;url&gt;jdbc:oracle:thin:<a href="http://twitter.com/192">@</a>&lt;<strong>ip</strong>&gt;:1521/pdbora12c&lt;/url&gt;<br>                    &lt;username&gt;anaevesto61&lt;/username&gt;<br>                    &lt;password&gt;anaevesto61&lt;/password&gt;<br>                    &lt;driverClassName&gt;oracle.jdbc.driver.OracleDriver&lt;/driverClassName&gt;<br>                    &lt;maxActive&gt;50&lt;/maxActive&gt;<br>                    &lt;maxWait&gt;60000&lt;/maxWait&gt;<br>                    &lt;validationQuery&gt;SELECT 1 FROM DUAL&lt;/validationQuery&gt;<br>                    &lt;defaultAutoCommit&gt;false&lt;/defaultAutoCommit&gt;<br>                    &lt;initialSize&gt;0&lt;/initialSize&gt;<br>                    &lt;testWhileIdle&gt;true&lt;/testWhileIdle&gt;<br>                    &lt;minEvictableIdleTimeMillis&gt;4000&lt;/minEvictableIdleTimeMillis&gt;<br>                    &lt;defaultTransactionIsolation&gt;READ_COMMITTED&lt;/defaultTransactionIsolation&gt;<br>                &lt;/configuration&gt;<br>            &lt;/definition&gt;<br>        &lt;/datasource&gt;</pre><pre>&lt;datasource&gt;<br>            &lt;name&gt;WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB&lt;/name&gt;<br>            &lt;description&gt;The datasource used for analytics record store&lt;/description&gt;<br>            &lt;definition type=&quot;RDBMS&quot;&gt;<br>                &lt;configuration&gt;<br>                    &lt;url&gt;jdbc:oracle:thin:<a href="http://twitter.com/192">@</a>&lt;<strong>ip</strong>&gt;:1521/pdbora12c&lt;/url&gt;<br>                    &lt;username&gt;anaprodstor61&lt;/username&gt;<br>                    &lt;password&gt;anaprodstor61&lt;/password&gt;<br>                    &lt;driverClassName&gt;oracle.jdbc.driver.OracleDriver&lt;/driverClassName&gt;<br>                    &lt;maxActive&gt;50&lt;/maxActive&gt;<br>                    &lt;maxWait&gt;60000&lt;/maxWait&gt;<br>                    &lt;validationQuery&gt;SELECT 1 FROM DUAL&lt;/validationQuery&gt;<br>                    &lt;defaultAutoCommit&gt;false&lt;/defaultAutoCommit&gt;<br>                    &lt;initialSize&gt;0&lt;/initialSize&gt;<br>                    &lt;testWhileIdle&gt;true&lt;/testWhileIdle&gt;<br>                    &lt;minEvictableIdleTimeMillis&gt;4000&lt;/minEvictableIdleTimeMillis&gt;<br>                    &lt;defaultTransactionIsolation&gt;READ_COMMITTED&lt;/defaultTransactionIsolation&gt;<br>                &lt;/configuration&gt;<br>            &lt;/definition&gt;<br>        &lt;/datasource&gt;<br> &lt;/datasources&gt;</pre><p>6. To share the user store among the nodes, modify user-mgt.xml ($EI_HOME/wso2/analytics/conf) as follows:</p><p>[Change <em>&lt;Property name=”dataSource”&gt;</em> as given]</p><pre> &lt;Property name=”dataSource”&gt;jdbc/WSO2UMDB&lt;/Property&gt;</pre><p>7. Add or modify “govregistry” datasource attribute in registry.xml ($EI_HOME/wso2/analytics/conf) as follows:</p><p>Replace &lt;<strong>ip &gt;</strong>with<strong> </strong>instance IP of which installed oracle server.</p><pre>&lt;dbConfig name=&quot;wso2registry&quot;&gt;<br>        &lt;dataSource&gt;jdbc/WSO2CarbonDB&lt;/dataSource&gt;<br>    &lt;/dbConfig&gt;</pre><pre>&lt;dbConfig name=&quot;govregistry&quot;&gt;<br>        &lt;dataSource&gt;jdbc/WSO2RegDB&lt;/dataSource&gt;<br>    &lt;/dbConfig&gt;</pre><pre>&lt;remoteInstance url=&quot;<a href="https://localhost:9443/registry">https://localhost:9443/registry</a>&quot;&gt;<br>        &lt;id&gt;gov&lt;/id&gt;<br>        &lt;cacheId&gt;jdbc:oracle:thin:<a href="http://twitter.com/192">@</a>&lt;<strong>ip</strong>&gt;:1521/pdbora12c&lt;/cacheId&gt;<br>        &lt;dbConfig&gt;govregistry&lt;/dbConfig&gt;<br>        &lt;readOnly&gt;false&lt;/readOnly&gt;<br>        &lt;enableCache&gt;true&lt;/enableCache&gt;<br>        &lt;registryRoot&gt;/&lt;/registryRoot&gt;<br>    &lt;/remoteInstance&gt;</pre><pre>&lt;mount path=&quot;/_system/governance&quot; overwrite=&quot;true&quot;&gt;<br>        &lt;instanceId&gt;gov&lt;/instanceId&gt;<br>        &lt;targetPath&gt;/_system/governance&lt;/targetPath&gt;<br>    &lt;/mount&gt;</pre><pre>&lt;mount path=&quot;/_system/config&quot; overwrite=&quot;true&quot;&gt;<br>        &lt;instanceId&gt;gov&lt;/instanceId&gt;<br>        &lt;targetPath&gt;/_system/config&lt;/targetPath&gt;<br>    &lt;/mount&gt;</pre><h3>Configure clustering related configs in EI Analytic profile</h3><p>8. Edit axis2.xml ($EI_HOME/wso2/analytics/conf/axis2/) in each node as follows.</p><ul><li>Enable clustering.</li></ul><pre>&lt;clustering class = &quot;org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent&quot; enable=&quot;<strong>true</strong>&quot;&gt;</pre><ul><li>Enable <strong>wka </strong>mode.</li></ul><pre>&lt;parameter name=&quot;membershipScheme&quot;&gt;<strong>wka</strong>&lt;/parameter&gt;</pre><ul><li>Add other analytics profile nodes details under members tag.</li></ul><pre>&lt;members&gt;</pre><pre>&lt;member&gt;</pre><pre>&lt;hostName&gt;[node1 IP]&lt;/hostName&gt;</pre><pre>&lt;port&gt;[node1 port]&lt;/port&gt;</pre><pre>&lt;/member&gt;</pre><pre>&lt;member&gt;</pre><pre>&lt;hostName&gt;[node2 IP]&lt;/hostName&gt;</pre><pre>&lt;port&gt;[node2 port]&lt;/port&gt;</pre><pre>&lt;/member&gt;</pre><pre>&lt;/members&gt;</pre><p>Sample Config:</p><pre>&lt;members&gt;<br>    &lt;member&gt;<br>       &lt;hostName&gt;192.168.**.***&lt;/hostName&gt;<br>       &lt;port&gt;4100&lt;/port&gt;<br>     &lt;/member&gt;<br>&lt;/members&gt;</pre><ul><li>For each node, enter the respective server IP address as the value for the <em>localMemberHost</em> property</li></ul><p>&lt;parameter name=&quot;localMemberHost&quot;&gt;[Server_IP_Address]&lt;/parameter&gt;</p><p>9. Configure the <em>event-processor.xml </em>($EI_HOME/wso2/analytics/conf/) file as follows to cluster CEP in the Receiver.</p><ul><li>Enable the <em>HA</em> mode</li></ul><p>&lt;mode name=&quot;HA&quot; enable=&quot;true&quot;&gt;</p><ul><li>Disable the <em>Distributed</em> mode</li></ul><p>&lt;mode name=&quot;Distributed&quot; enable=&quot;false&quot;&gt;</p><ul><li>For each node, enter the respective server IP address under the HA mode Config section.</li></ul><pre>&lt;eventSync&gt;<br> &lt;hostName&gt;*.*.*.*&lt;/hostName&gt;</pre><p>10. Update spark-defaults.conf ($EI_HOME/wso2/analytics/conf/analytics /spark/) file as follows to use the Spark cluster embedded within Analytic profile.</p><ul><li>Keep the carbon.spark.master configuration as local. This instructs Spark to create a Spark cluster using the Hazelcast cluster.</li><li>Enter 2 as the value for the carbon.spark.master.count configuration. This specifies that there should be two masters in the Spark cluster. One master serves as an active master and the other serves as a stand-by master. (Change count according to number of nodes)</li></ul><pre>carbon.spark.master local<br>carbon.spark.master.count 2</pre><ul><li>Create a symbolic link to &lt;$AnalyticProfile_Home&gt;in both nodes, where paths of those symbolic links are identical. This ensures that if we use the symbolic link to access the analytic profile, we can use a common path.</li></ul><p>In this scenario we are having analytics profile in two different instances which are having two different OSes. Therefore choose a common directory as follows:</p><p>/usr/share/das/das_symlink</p><p>Use following command to create symlink folder.</p><pre>ln -s &lt;$AnalyticProfile_Home&gt; &lt;$Symlink_Folder&gt;</pre><p>Sample config:</p><pre>ln -s /home/debian/analytics2/wso2ei-6.1.0/wso2/analytics /usr/share/das/das_symlink61</pre><p>Give permission to that folder to have access while creating analytics cluster. (User group and user name should be change accordingly). Use following command for that.</p><pre>sudo chown -R username:group directory</pre><p>Ex: sudo chown -R cloud-user:cloud-user /user/share/das/das_symlink61</p><p>Check for updated permission for the folder using command ls -al</p><pre>[cloud-user@ei6s2-analytics1 das]$ ls -la</pre><p>Sample output:</p><pre>lrwxrwxrwx. 1 <strong>cloud-user</strong> <strong>cloud-user</strong> 69 මාර් 17 11:35 <strong>das_symlink61 -&gt; /home/cloud-user/EI610Analytics1/wso2ei-6.1.0-SNAPSHOT/wso2/analytics</strong></pre><p>Now you are done with creating symlink.</p><p>Add symlink in spark-defaults.conf file.</p><pre>carbon.das.symbolic.link /usr/share/das/das_symlink61/</pre><p>11. Add followings in to wso2server.sh ($EI_Home/wso2/analytics/bin/)</p><pre>-Dcarbon.das.symlink.config.dir.path=&lt;SYM_LINK_PATH&gt;/conf<br>-Dcarbon.das.symlink.external.lib.dir.path=&lt;SYM_LINK_PATH&gt;/../../lib<br>-Dcarbon.das.symlink.dropins.dir.path=&lt;SYM_LINK_PATH&gt;/../../dropins<br>-Dcarbon.das.symlink.internal.lib.dir.path=&lt;SYM_LINK_PATH&gt;/../lib<br>-Ddas.symlink.components.repo=&lt;SYM_LINK_PATH&gt;/../components/plugins</pre><p>Sample config:</p><pre>ANA_HOME=”/usr/share/das/das_symlink61&quot;<br>...</pre><pre>-Dcarbon.das.symlink.config.dir.path=$ANA_HOME/conf \<br>-Dcarbon.das.symlink.external.lib.dir.path=$ANA_HOME/../../lib \<br>-Dcarbon.das.symlink.dropins.dir.path=$ANA_HOME/../../dropins \<br>-Dcarbon.das.symlink.internal.lib.dir.path=$ANA_HOME/../lib \<br>-Ddas.symlink.components.repo=$ANA_HOME/../components/plugins \</pre><p>12. Add following in to load-spark-env-vars.sh file ($EI_Home/wso2/analytics/bin/).</p><pre>export CARBON_CONFIG_DIR_PATH=/usr/share/das/das_symlink61/conf</pre><p>Note: Replace path with given path.</p><p>You are done with configurations :) .</p><p>When you started, you can check for spark cluster to identify status. Default url for spark cluster : &lt;ip_instance&gt;:8082/</p><p>Sample URL:</p><pre><a href="http://192.168.48.142:8082/">http://192.168.**.**:8082/</a></pre><p><strong>Note</strong>: As we didn’t configure the deployment synchronizer, it is required to deploy any C-App use in the Analytics profile cluster set up to both the nodes.</p><h3>Important Notes</h3><ol><li>When changing datasources/clean up datasources within cluster, you should have to clean following folders too. ( rm -r * ).</li></ol><ul><li>solr/*</li><li>tmp/*</li><li>repository/data/*</li><li>repository/database/*</li></ul><p>2. When you change symplinks, clear above folders and additionally followings too.</p><ul><li>work/*</li></ul><p>3. When you are going start cluster, start one node and in parallel you can start other node too. Otherwise you will get known issue as follows:</p><pre>ERROR {org.wso2.carbon.event.processor.manager.core.internal.HAManager} -  CEP HA State syncing failed, No execution plans exist for tenant  -1234<br>org.wso2.carbon.event.processor.manager.core.exception.EventManagementException: No execution plans exist for tenant  -1234<br>    at org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorManagementService.restoreState(CarbonEventProcessorManagementService.java:83)<br>    at org.wso2.carbon.event.processor.manager.core.internal.HAManager.syncState(HAManager.java:336)<br>    at org.wso2.carbon.event.processor.manager.core.internal.HAManager.access$100(HAManager.java:49)<br>    at org.wso2.carbon.event.processor.manager.core.internal.HAManager$2.run(HAManager.java:276)<br>    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)<br>    at java.util.concurrent.FutureTask.run(FutureTask.java:266)<br>    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)<br>    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)<br>    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<br>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)<br>    at java.lang.Thread.run(Thread.java:745)</pre><p>Refer [1] for more details and for known issues.</p><h4>References:</h4><ol><li><a href="https://docs.wso2.com/display/CLUSTER44x/Minimum+High+Availability+Deployment+-+DAS+3.1.0">https://docs.wso2.com/display/CLUSTER44x/Minimum+High+Availability+Deployment+-+DAS+3.1.0</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91819a90ab7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>