<?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 Ian Sikora on Medium]]></title>
        <description><![CDATA[Stories by Ian Sikora on Medium]]></description>
        <link>https://medium.com/@ianjsikora?source=rss-e13e0c8d675f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8zPJ_W24Y_81AIb2BzOoMw@2x.jpeg</url>
            <title>Stories by Ian Sikora on Medium</title>
            <link>https://medium.com/@ianjsikora?source=rss-e13e0c8d675f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 00:20:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ianjsikora/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[Simple Automated Search Tests in Python]]></title>
            <link>https://medium.com/@ianjsikora/simple-automated-search-tests-in-python-23f0028bb0ae?source=rss-e13e0c8d675f------2</link>
            <guid isPermaLink="false">https://medium.com/p/23f0028bb0ae</guid>
            <category><![CDATA[google-apps]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[selenium]]></category>
            <dc:creator><![CDATA[Ian Sikora]]></dc:creator>
            <pubDate>Wed, 15 Jun 2016 03:58:48 GMT</pubDate>
            <atom:updated>2016-06-15T03:58:48.249Z</atom:updated>
            <content:encoded><![CDATA[<h4>Summary</h4><p>I was toying around with automated testing and wrote a simple script to check the quality of our search results. It’s not the most efficient solution, but it works. I discovered some nice tools along the way so I figured I’d share what I learned. Links to the coolest finds 👇🏻</p><ul><li><a href="https://github.com/burnash/gspread">gspread</a></li><li><a href="https://sheetsu.com/">Sheetsu</a></li><li><a href="https://developers.google.com/apps-script/">Google Apps Script</a></li></ul><h4>tl;dr</h4><p>HOOQ is in the final stretch of rebuilding its entire tech stack. We’ve found manual testing to be a chore so we’re working to automate as many tests as possible. The engineers are busy working on core features so I decided to play around with <a href="http://selenium-python.readthedocs.io/">Selenium</a> and see what I could do on my own.</p><p>I started by creating a simple function that opens a fresh browser instance, sends in user credentials and signs in. I found that Search was a pretty simple feature to automate so I wrote a few functions to control Search. The next question: what to test?</p><p>I’ve always been interested by how users search for content. Time and time again, I’ve seen that a lot of queries fall within a few general terms and the rest are scattered in a long tail of more specific terms. The popular terms do change over time, but the distribution remains constant. In addition, many of the these terms have fairly obvious results. For instance, <em>Super </em>should probably return <em>Supergirl. Captain</em> should probably return the best <em>Captain America</em> movie. I trust the complex science behind Search, but it seems worthwhile to check that popular queries return results that a normal human would expect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*jaDEj2y-kOkXY4qQzMviLQ.png" /><figcaption>At minimum we should make sure that the top queries (green box) have great results.</figcaption></figure><p>There are smarter ways to solve the problem. One could analyze the actual click-through rates of the results of all queries at scale. One could hardcode a few suggested results and A/B test the performance in the wild. One could query Elastic Search directly instead of opening a browser to search the website. All great solutions. All too much work for an MVP.</p><p>The goal was to build a simple system for a non-techie — a tool that we could turn over to an intern trust him or her to independently manage the test cases. Google Sheets was the logical place to start. I first wrote a <a href="https://developers.google.com/apps-script/">Google Apps Script</a> that automatically grabbed the top hundred searches from New Relic. The tester simply needed to load the sheet and start suggesting results.</p><p>The next step was to extract this information from the Google Sheet into the Python environment. I start toying around with <a href="https://sheetsu.com/">Sheetsu</a>, a service that seamlessly turns the Google Sheets data into a JSON endpoint. Sheetsu is pretty great, but I eventually landed on <a href="https://github.com/burnash/gspread">gspread</a> because it allowed more control over the spreadsheet.</p><p>After extracting the data from Google, I ran the queries through Selenium. The script iterated over the queries and logged the results in the Google Sheet. I also sent the data to our test management software, <a href="http://docs.gurock.com/testrail-api2/bindings-python">TestRail</a>. All of these tests are bundled into a time series so we can benchmark the quality of Search over time.</p><p>We’ve added the Selenium script to Jenkins so that we check the top search results every time we deploy. The output won’t drive changes on the Search algorithm, but it will offer a pragmatic evaluation of each deployment. If a change to Search makes the top 100 queries worse, then we should probably reevaluate the change.</p><p>We will continue to develop automated tests to answer similar questions in the months ahead. When I find helpful libraries, I’ll share them here.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23f0028bb0ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>