<?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 Aral Pikdöken on Medium]]></title>
        <description><![CDATA[Stories by Aral Pikdöken on Medium]]></description>
        <link>https://medium.com/@aral.pikdoken?source=rss-737130873861------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*jX3aWeM0DjAL8YDm0mqLlQ.jpeg</url>
            <title>Stories by Aral Pikdöken on Medium</title>
            <link>https://medium.com/@aral.pikdoken?source=rss-737130873861------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 01:55:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aral.pikdoken/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[Getting started: Trendyol Storefront Test Automation Architecture]]></title>
            <link>https://medium.com/trendyol-tech/getting-started-trendyol-storefront-test-automation-architecture-4a0b6a4cce5c?source=rss-737130873861------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a0b6a4cce5c</guid>
            <category><![CDATA[trendyol]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Aral Pikdöken]]></dc:creator>
            <pubDate>Mon, 22 Jul 2019 11:09:15 GMT</pubDate>
            <atom:updated>2019-07-22T13:47:42.353Z</atom:updated>
            <content:encoded><![CDATA[<p>Trendyol web teams (Web and Mobile Web) maintain an internal test automation framework and use it widely to automatize the testing procedures.</p><p>In this article, besides from the usage of object oriented features and design patterns in the phase of implementation of framework; core approaches that will help to provide a better understanding will be discussed. Before starting on, let’s take a look at our technology stack.</p><ul><li><a href="http://www.seleniumhq.org/projects/webdriver/"><strong>Selenium Web Driver</strong></a>: A library that is used to automate browser interaction.</li><li><a href="http://maven.apache.org/"><strong>Maven</strong></a>: A Java software project management tool.</li><li><a href="https://testng.org/doc/"><strong>TestN</strong></a><strong>G</strong>: A Java testing framework.</li><li><a href="https://jenkins.io/"><strong>Jenkins</strong></a>: A build server that can be used to support continuous integration (CI) and continuous testing.</li></ul><p>Firstly, we might start by understanding the analogy that lies beneath our automation framework. Here is the basic illustration of framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*3wtd6rjX2wYqD-9SDWv91w.png" /><figcaption>Analogy of automation framework</figcaption></figure><p>As illustrated above, there is a visitor object that store or does not store(depending on the context of test) user information such as email, password, userid, authentication token etc. and also general methods that construct the top layer of architecture and thus provide abstraction. <strong>Visitor </strong>uses a browser to interact with web pages. <strong>Browser </strong>is responsible for carrying out visitor activities(scrolling, navigating, adding or deleting cookies etc.) inside webpages . <strong>Web pages</strong> store locators , methods used inside of pages(adding a product to cart, adding a product to favorite etc.). Moreover web page consist of <strong>web components</strong> such as filter box, address box, search box and many more. UML diagram of core architecture is sketched below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AoUQ00p72Pd5_Z0LiH7_Kw.jpeg" /><figcaption>Detailed diagram of framework architecture</figcaption></figure><p>From now on, we can make mention of major features in our framework that we use comprehensively.</p><h3><strong>Buyer Pool — Product Pool</strong></h3><p>During execution, using interdependent test data (using same user credentials, product information on more than one test, thus creating dependencies among these) may cause undesirable situations. Therefore in our framework, test data is segregated and stored in data pools. Each test obtains requested data during run-time and sets it free after the end of test for further usage.With the help of data pools, tests run with separate data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*v9IKG9M8mDFBsqtE5ovD9A.png" /><figcaption>User Interface of object pool service</figcaption></figure><h3><strong>Pages ( Page Object Model)</strong></h3><p>Page Object Model has become one of the most popular design patterns used in test automation frameworks. With POM, we treat every unique web page(homepage, login page etc.) as page objects and store their variables, locators and functions inside them. With this way, code maintainability, readability and reusability is satisfied.</p><h3><strong>Boutique Builder — Payment Builder</strong></h3><p>Before test execution, same behaviours with different contents would be in demand. For instance, we might need a boutique that comprises of<strong> only one variant products</strong>,<strong> multiple variant( S, M, L) products</strong> or<strong> a boutique with different kind of promotions</strong> (free cargo, discount on basket, fast delivery etc.). On the other hand , we might want to <strong>pay with different methods</strong> (saved credit card, saved debit card, payment with different invoice and billing addresses) . By using builder pattern and creating these builders, we provide different contents in terms of needs .</p><h3><strong>Data Lists</strong></h3><p>While navigating through pages, we display various products at <strong>search result</strong>, <strong>orders page, cart page</strong>, <strong>favorites page</strong>. Occasionally, we might need to perform some actions or assertions among those components. For this reason, we fetch the products and construct data lists. With data lists, it becomes easier to make assertions and carry out more specific approach(searching a specific product, assertions of product sorting etc.) during tests. Virtual illustration of a data list is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*PF56JgfENK2B8y8LW55kcg.jpeg" /><figcaption>Depiction of a datalist in search result</figcaption></figure><h3><strong>API Helpers</strong></h3><p>As a team responsible with storefront of Trendyol and therefore mainly focus on UI automation; we might be in need of the usage of API’s when it becomes necessary. For the reason that API’s provide faster way of operating in most of the time compared with operations done through UI, we use them and reduce the execution time of tests. For example, besides from login tests, we wouldn’t need to log the user in via UI interaction because we do not aim to test the login functionality. Therefore, we use the API; fetch an authentication token, set it on browser cookies and keep on.</p><h3><strong>Matchers</strong></h3><p>Matchers are used to make assertions after test has finished executing, we use a library named <a href="http://hamcrest.org/"><strong>hamcrest</strong></a><strong> </strong>and use its matchers.In addition to this, we write our custom matchers when assertions become complex. An example matcher used in framework is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*xAKJTVA_JMkXeYl2K4jpVQ.jpeg" /><figcaption>Custom matcher example</figcaption></figure><h3>Test case example</h3><p>In the following code block, searching with a common keyword in homepage is written . At first, a buyer is generated and fetched buyer opens the home page.Then buyer searches with a keyword, expecting to see products at search result and expects navigating to correct url.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*7WoWjm4Yhp-LbbqPfq8TEg.jpeg" /><figcaption>Example case from search test</figcaption></figure><p>In the next chapter, pipeline processing(running test remotely, generating reports) of our project will be explained.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a0b6a4cce5c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/trendyol-tech/getting-started-trendyol-storefront-test-automation-architecture-4a0b6a4cce5c">Getting started: Trendyol Storefront Test Automation Architecture</a> was originally published in <a href="https://medium.com/trendyol-tech">Trendyol Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>