Testim is the ultimate testing automation platform, designed to provide a complete testing solution, all in one place.Testim lets you quickly create tests, report bugs, and run tests in the cloud for your web apps. Using testim, you can get setup and start creating test scenarios and bugs within minutes, easily replicate and reproduce them, while everything is running on premise or in the cloud...
Quite often there are some elements and attributes that change dynamically on a page. For example – Say you have a currency conversion application. Today, 1 US Dollar would be equal to 0.89 Euros. The same dollar could be 0.90 Euros the very next day; as they change dynamically on a daily basis. In Testim, you have the following ways to handle dynamically changing elements and attributes-
Tip 1:Uncheckdynamically changing attributes from the View Locators list
When some attributes of an element changes dynamically, you have the option of ignoring those attributes in the element location strategy. In other words, you are making the AI underneath hood to ignore those attributes; when it tries to locate that particular element on the page.
For example – Say the “Index” attribute of an element changes every time you reload the page.
You can ignore this attribute from the locators list and make the AI only look at the other attributes extracted from the DOM to uniquely identify this element on the page.
NOTE: The AI can automatically adapt to changes in the page; so the above step may not be necessary but it is good to know it exists.
Tip 2: Validating Dynamically Changing Elements
Whenever you want to validate dynamically changing elements, Testim has export parameters to handle this situation.
For example – Say you want to validate the price of your flight trip. The price changes dynamically on a daily basis based on multiple factors. In this case, you can use export parameters; where in, you can store the element in an export variable and use the variable in different steps as parameters and also use it to do different validations in a page.
Tip 3: Generating random values during run time
Quite often there is a need to generate random values containing text, numbers and certain prefixes during run time. This is possible using the generate random value step in Testim. The value gets stored in a variable name which can be used in other steps as well. By default the variable name is randomValue.
We recently hosted a webinar on Common Automation Pitfalls and Solutions with an awesome panel consisting of Jonathan Lipps, Philip Lew and me. There were a lot of great discussions on this topic and we wanted to share this with the community as well.
Several topics related to automation were covered in this webinar, including-
How automation fits in the SDLC?
Is the Testing Pyramid still relevant in this day and age?
How automation complements manual testing?
How it fits in the CI/CD pipeline?
How to come up with a good test automation strategy?
What are common pitfalls we fall into while doing test automation?
What are some good practices of automation to keep in mind?
What are the new trends in automation?
Automation is not a “one size fits all” solution. It does not solve all testing problems. It is just one aspect of the overall testing process. This webinar helps to instil that mindset. It will also be a good resource for all the testers starting to do test automation and experienced testers who are looking for more ideas to build and maintain robust automation frameworks.
Below are some quotes from the conversation-
Phil: “I think when we talk about automation strategy, a lot of folks start digging down really quickly and do tools and frameworks and things like that. But to me, I think that’s the easy part, the hard part, determining why and how are we going to show value?”
Johanthan: “Don’t call something a flake, investigate, figure out exactly what the problem is with it and then either fix that problem in your app or your infrastructure or consider doing away with the test entirely.”
Me: “When you’re trying to build automation frameworks try to also make it as simple as possible because in that way you can further avoid a lot of pitfalls in running and maintaining it. “
Below is the recorded video of the webinar-
Webinar Common Automation Pitfalls and Solutions Final - YouTube
If you have any feedback or ideas for other webinar topics, we would love to hear that as well. You can email us at email@example.com and share them.
We work hard to improve the functionality and usability of our autonomous testing platform to support your software quality initiatives. This month we’re thrilled to release a few of your most requested features; Multi Tab Indicator, Advanced Merge,Failed Test Retry Flag and Refresh Option. Check them out and let us know what you think.
Multi Tab Indicator
What is it?
You now have a numeric value that displays in the top right section of each step that executes in multiple tabs.
Why should I care?
There is no longer a need to open a step and look at the screenshots or other related information to know what tab the step ran on. With the tab number indication, the user has more visibility into test runs that involve multiple tabs/windows. Learn More
What is it?
When merging changes into a branch, a modal window will now pop up showing different changes that are being merged into the branch. The changes are categorized into Test, Shared Steps and Suites.
At the top level, users will be able to see what changed in each category – how many new items were created, updated, or deleted. Expanding each item, will display more details about individual changes.
Why should I care?
You now have better visibility and confidence before merging branches. All the details that are getting into the branch are clearly detailed in the modal window.
Failed Test Retry Flag
What is it?
When this flag is set, a failed test will be executed repeatedly until either the test passes or the max number of retries has been reached (in which case the test will finish execution with a failed status). This flag is passed in via the CLI by using the below syntax
Why should I care?
You now have the ability to re-run failed tests automatically, with the use of this flag. So even if a test fails once or twice because of some unexpected issues, it will automatically run again so that the test passes the next time.
NOTE: When a test passes after one or more retries, it will be indicated in the UI as shown below
What is it?
This new option will completely reload the page before proceeding to the next step.
Why should I care?
You no longer have to add custom action to reload the page. Now, there is a one click option to do it.
Selenium tests have the reputation of easily becoming fragile tests. We’ll look at some common causes of fragile Selenium tests, how you can alleviate some of these issues, and how Testim can provide extra value and robustness to your UI tests.
What’s a Fragile Test?
A Selenium test can be fragile just like any other automated test. A fragile test is when changes that seemingly shouldn’t influence the test result do so anyway. An example that most of us have encountered is when we change one piece of code and break a test that we believe shouldn’t break. But there can be other influencing factors: test data, the current date and time or other pieces of context, or even other tests. Whenever these factors influence the test outcome, we can say we have a fragile test.
Fragile Selenium Tests
Selenium is a tool to automate the browser, giving us the power to write automated tests for our (web) UI. This entails that we will execute our entire application more or less. A lot of moving parts means these Selenium tests can become fragile more easily than simple unit tests.
Let’s look at some causes of fragile Selenium tests and how we can improve them so they become more robust. The causes we’ll cover are
tight coupling to the implementation
Tight Coupling to the Implementation
Just like unit or integration tests, Selenium tests can be written so that they’re tightly coupled to the implementation. However, when the implementation changes, this means our tests need to change too, even if the public or visual behavior hasn’t changed.
For example, let’s say we’ve written our test to click on a button with ID “login-button.” When this ID is changed to something else, for whatever reason, our test will fail, even if the test case still works fine when performed manually.
This is because the test is tightly coupled to the specific implementation. How can we decouple our test from the implementation?
In this specific example, we could improve the test by having the test call a helper method that knows about the implementation. So instead of clicking the button with the ID “login-button,” we can make it call a method named “Login” and pass the necessary parameters. If all of our tests use this helper method, we’ll only have to change one piece of code when the implementation changes.
Now, let’s take this a step further and group our helper methods inside a class per page. This is the Page Object design pattern. If something on a page changes, we know where to update the implementation for our tests—in the corresponding page object.
Can we do better? Yes, we can. Thanks to Dynamic Locators and AI, Testim can identify the page element we need, even if its attributes have changed. Check it out:
This means that the QA team can record tests in their browser and they will still run fine if some underlying implementation detail changes.
Another common cause of fragile tests, especially when testing a complete application, is that we rely on external services to work as we expect. These can be particularly hard to control. But when they don’t behave as they should for the test, or if they aren’t available, the test fails. And this can happen even if we haven’t changed or broken anything on our side.
In this case, we could make our tests more robust by creating a mock service and having our application call that service. Otherwise, we’re also testing the external service and setting ourselves up for fragile tests.
By creating a mock service, we have full control over the responses. We can define what data is returned, but we can also simulate error responses, timeouts, or slow responses. These are things that are harder to imitate when we’re using the real external service.
When we’re testing an application, we often have test cases where we need to wait for a certain event. For example, we might have an application that makes an AJAX call and renders the result on the page. We now have to tell Selenium to wait until the result is rendered on the page. But for how long?
Luckily, Selenium has explicit and implicit waits. They allow us to tell Selenium to wait until a certain condition is met. In our example, we would wait until the result of our AJAX call has been rendered. When that has happened, we can continue our test.
Most applications that we test with Selenium will require some data storage. Our Selenium tests can become fragile because of the data for two reasons: either the data changes or certain tests continue with data from previous tests.
When we set up a database for our tests, the amount of data we pump into it can become quite large. Consequently, when we make a small change to this test data for one test, we might break another test that depended on this data. This is especially true for larger test suites where it has become unclear which pieces of data are necessary for which tests.
A possible solution is to populate the database with separate data for each test. However, that can lead to a large amount of test data that can be difficult to maintain over time.
A better option is to populate your database as part of each test. You could start with basic data that doesn’t change, and then have each test add the data that it needs.
Another potential issue with data is when one test changes the data of another test. Take a simple example where a test changes some identifier of a record (a product ID for example). At the end of the test, it changes it back so that another test can find that same record. However, if the first test fails to revert the change, the second test won’t find the record and will also fail.
This is a case of interacting tests: a test fails because it has been influenced by another test, even though the failing test runs fine when it’s run individually.
The best solution is to give each test its own set of data. We can achieve this by spinning up a new database for each test. This might sound like a complex solution, but we could leverage containers for this: start a container with a database, fill it with the necessary data, run the test and end by shutting down the container. Rinse and repeat for other tests.
If a separate database for each test isn’t an option, we could look at solutions like in-memory databases or libraries that reset our database to the state before the test (like Respawn for .NET).
The typical example of a fragile Selenium test occurs because of a context, like tests that depend on certain dates or times. This is true for every kind of test, so it also applies to Selenium tests.
When your tests depend on certain dates or times, they might suddenly fail when the conditions (temporarily) don’t apply. This is often the case on leap days, but depending on your business logic, other dates may cause your test to fail too.
In unit tests, the date and time can easily be mocked out, but it’s often much more difficult in Selenium tests. To make matters worse, you’re dealing with two clocks: the “server” clock (where your back-end application is running) and the browser’s clock.
There are many options here, and the solution for you depends on your specific case.
On the server-side, you could wrap calls to the system clock in a service and inject a mock service anywhere you need it in your tests. In production, you would then inject the service that uses the real clock. There’s also libfaketime for Linux and Mac OS X, which might be an easier route.
You can mock the browser’s date and time using TimeShift.js and inject this in your Selenium tests.
Is It Really That Hard?
All of these problems have solutions, but they’re often non-trivial to implement, especially in legacy applications. Also, many of these solutions require time and effort from developers, which you may not be able to spare. But if the tester (a QA department, the product owner, or the end-user) can work together with the developers, then you can achieve solid tests more easily.
Also, take a look at Testim. It can cover more than Selenium does out of the box and it provides a useful platform for developers, the QA team, and end-users to collaborate.
What if you need to verify the contents of a downloaded Word or Excel file? Or if your application has or SMS integration? And wouldn’t you like to have the tester create your UI tests instead of taking time from your developers?
Testim provides an easy recording function for non-developers to write tests. This also allows non-developers to report a bug and immediately include a test to reproduce the issue. Traditionally, similar recording tools have created fragile tests because they’re too close to the implementation. But as we mentioned, Testim takes a different approach and leads to more robust tests.
For QA professionals, there are powerful features, like running tests with different data sets, conditional steps, and screenshots. Testim also learns about your tests over time, making your tests more stable the more you run the tests, even when implementation details change.
Testim allows you to create robust UI tests for your application that need minimal maintenance and provide maximum value to both developers, QA professionals, and end-users.
Author bio: This post was written by Peter Morlion. Peter is a passionate programmer that helps people and companies improve the quality of their code, especially in legacy codebases. He firmly believes that industry best practices are invaluable when working towards this goal, and his specialties include TDD, DI, and SOLID principles.
Additional capital will allow the company to scale operations, headcount and accelerate autonomous testing
San Francisco, under embargo for 9 a.m. ET June 12, 2019– Testim, a leading provider of AI based software testing, today announced it has closed $10 million in Series B funding to address the global demand for continuous testing allowing development teams to move at the speed of business without compromising software quality. This funding round was led by SignalFire. Meron Capital and existing investors Lightspeed Venture Partners, NHN Ventures and Spider Capital also participated in the round, bringing the total amount of capital Testim has raised to $19.5 million.
“To remain competitive, software teams must move faster than ever,” said Oren Rubin, founder and CEO of Testim. “We are helping them test more with much less effort, reducing their release risk and increasing their velocity to market.”
Software releases that were once planned on a monthly basis now occur weekly with updates almost every day. Application development organizations are using AI-enabled test automation to streamline the software testing process at each stage of the DevOps lifecycle. The shift to AI-based testing is being driven by the need for continuous and faster development that does not compromise the quality of the delivered software.
Rubin continued, “When Testim was founded, our goal was to enable software teams to author tests 20 times faster than before. No one believed it was possible but by continuously innovating and leveraging new technologies, we met that goal. Now, we have a more ambitious one – to author 150 times faster through autonomous testing.”
Testim’s platform, which uses artificial intelligence to speed up test authoring and dramatically reduce test maintenance, ensures that companies can sustain a fast release cadence with the highest quality software. The new funding will also bring to market Testim’s mobile app test automation platform, which is in early access.
“We invested in Testim early because we recognized its leadership and innovation in the fast-growing test automation space,” said Ilya Kirnos, founding partner and CTO of SignalFire. “We’ve already seen Testim win customers like Autodesk, NetApp, Logmein, Sprinklr and JFrog. With 700 percent market growth in less than two years, Testim is on track to disrupt the $37 billion testing market with its technology innovation.”
Ronit Belson recently joined Testim as its chief operating officer. She brings startup and enterprise experience from the DevOps space, leading companies and teams at Cloudmeter (acquired by Splunk), OpTier (acquired by SAP) and Rollout.io. Belson’s background in scaling high performing teams will support Testim’s plans to grow operations in North America and attract new hires across all departments including engineering, product, sales, marketing and customer success.
First to introduce AI-based test authoring for native mobile applications
Achieved goal of allowing customers to author 1000 tests in a single month
2019 SD Times 100 ‘Best in Show’ in Software Development for Testing
“As an Agile software development organization, at JFrog, we rely on automated code testing coverage. This allows us fast releases while ensuring our customer experience and software quality,” said Eli Givoni, QA and release manager at Jfrog. “Writing a reliable UI functional test is an art and requires experience. Using Testim, engineers that have never written a single Selenium test can easily create stable quality tests with the right coverage that we need.”
“We picked what we thought was the most mature product of all those we had evaluated. Testim actually made record and playback work for modern web apps, making it easier for non-technical team members to author tests. It is quite easy to use and straightforward,” said Tamir Daniely, software development engineer in test at LogMeIn.
“Testim.io’s mobile product is so intuitive that we’re able to create a good test suite for our Android app that integrates with our CD process using very little effort,” said Rotem Itzhak, head of mobile at Figure8. “Testim is also easy to manage by our QA team, leaving our dev teams more time to add features and change our app at a faster pace.”
To learn more about Testim or to schedule a demo, please visit www.testim.io.
Founded in late 2014, Testim helps companies accelerate time-to-market, improve software quality and integrates into agile processes. With offices in San Francisco and Tel Aviv, the company is a pioneer in using AI for the authoring, execution and maintenance of automated tests. Included in the 2019 SD Times 100: ‘Best in Show’ in Software Development for Testing, the Testim platform learns and adapts automated tests to code changes, reducing 90 percent of maintenance time and 70 percent of authoring time. Netapp, Autodesk, Swisscom, Logmein, and others run over 2,000,000 tests using Testim every month.C
Testim gives you the flexibility to add regular expressions (RegEx) to help in easier string searching and validations. It is extremely helpful in extracting required information from a web page or when there is a need to validate strings that has a portion of it changing dynamically.
For Example – Say you want to validate the label “Price” in the below page.
The price value is going to change dynamically based on the itinerary booked; every time you run the test. So, if you want to ensure the label “Price” is displayed correctly in the page no matter what the price value maybe, RegEx can be of great help here.
You could add /^Price/ in the Expected Value Field in the properties panel of the Test Step; within Testim. What this does is, it validates whether the text starts with the word “Price”, allowing the rest of the text to be dynamic and still pass the validation.
Commonly used RegEx and their syntax are as follows-
More references on how to use RegEx can be found below-
While working on our daily tasks in agile teams, we quite often have this feeling where we are working on multiple tasks all day long and at the end of day when we review our work, we realize we haven’t accomplished anything concrete. The main reason for this is, our work environments are filled with distractions from having unnecessary and unproductive meetings to people checking their messages on phones, emails and slack channels. As a result, we feel demotivated, less productive and burnt out by the end of the day.
After years of working in the tech industry and going through the above experiences, I decided to take a hiatus from my job and do some reflection on my personal and career growth. In 2017, I started a 6 month journey of self exploration and discovery. I read books, listened to podcasts on mindfulness, productivity, leadership and self-motivation and interviewed successful people. Finally, when I went back into the workforce I tried to apply various concepts learnt from this journey in my daily tasks at the workplace.
The concepts I learnt helped me to get more focus, improved my critical thinking skills, helped to figure out ways to prioritize my tasks and I made myself more approachable to people in my personal and professional life. Below you will find the different hacks, tools, tips and tricks that I learnt and practiced, that can help anyone become a highly accomplished and productive tester; while working in a vastly chaotic and fast paced environment.
Different Hacks to become mindful and productive
There are 2 books worth mentioning here that has deeply influenced the way I do things. They were Deep Work by Cal Newport and Procrastinating on Purpose by Rory Vaden. In Deep Work, the author discusses the science and practical steps for focusing without distraction on cognitively demanding tasks. You can refer to this blog post for more detailed information – Deep Work. In Procrastinating on purpose, the author discusses a methodology through which you can prioritize your tasks. This was termed the “Focus Funnel”.
In a nutshell this is how it works, say you have a task – TASK A. This is how you decide whether you can work on TASK A by putting it through the focus funnel.
Step 1: Can TASK A be eliminated?
Step 2: If NO, Can TASK A be automated?
Step 3: If NO, Can TASK A be delegated?
Step 4: If NO, Can TASK A can be delayed further by Procrastinating on purpose?
Step 5: If NO, then you work on TASK A by Concentrating on it
Priority Dilution is, when you delay the most important tasks by allowing your attention to focus on less important but urgent tasks. Priority Concentrate is, when you concentrate on the most important tasks and that is your priority NOW. You can find more information from the book, but I have used these ideas to help in my daily decision making process.
Based on the above readings, the numerous research I have done and applying these concepts in real life; I came up with the different hacks to become a mindful tester. It can be broadly classified into 3 categories. In each category there are different tips and tools that can make you more efficient
Daily and Weekly Planning
Everyday in the morning spend just 5- 10 minutes reviewing what tasks need to be accomplished for the day with the help of a To do list.
Prioritize the list based on the focus funnel described in the initial section. My motto is to finish the top 3 items on my list everyday. The rest gets carried over to next day
Schedule blocks of uninterrupted time each focusing on one particular task. I usually try to do 3 blocks/day (about 45 minutes each)
At the end of the day spend 5 minutes to review what tasks were accomplished, what gets carried over the next day and finally what are the tasks that need to be accomplished the next day
As part of my job I need to do 5 things – Learning, Reading, Writing, Conference Presenting and working with Customers
I want to make sure I dedicate time for each one of them. So I already know how many time blocks minimum I need for each of these items; starting with 2 Time Blocks/Week for Learning, Writing and Conference related tasks and do reading when I take breaks between time blocks. Customers are always first priority and they usually vary from 1-3 time blocks a day based on what customer tasks need to be accomplished that particular day.
I usually keep Monday – Wednesdays as my customer days and keep Thursday and Friday as my writing days and tasks that need my creativity and thinking
You can always customize the above routines based on your tasks and context.
Here are some interesting facts regarding meetings
There are great talks about how unproductive meetings have a huge negative impact on companies and people. Check out the TED talks from David Grady and Jason Fried (co founder of BaseCamp and 37 Signals) for more information.
Based on the above findings it is clear that having unproductive meetings has a detrimental impact on the overall workplace productivity. So how do you avoid them? Here are some tips to help you make that decision.
First of all, you need to decide whether a meeting is necessary to discuss a particular issue. Is this something that can be solved by talking to the person directly? Is it something that can be an email conversation?
If you have decided a meeting is necessary, not more than 7-8 people should be invited to the meeting. Research suggests that having more than 8 people in a meeting prevents clear decisions being made at the end of the meeting. Remember if you have 15 – 20 people in a meeting it is a conference; not a meeting
Meeting invites need to have a clear title and agenda
Everyone needs to come prepared for the meeting
Start and finish meetings on time
Have clear action items and follow up on them
How many of you have experienced this situation before when attending remote meetings?
Not announcing who is in the meeting room
Not paying attention to food chomping, coffee slurping and sounds generated by putting your laptop, notepad or coffee mug on the table. This may seem like a trivial/normal thing for people in the room but for the person joining in remotely, this sounds like a loud noise going right through your ear buds, especially when wearing noise cancelling headphones. I have been there and done that
Not sharing screens while going over presentations or when someone is talking about something he/she is projecting on the screen in the room. The remote employee is left to tap into their visualization techniques to make assumptions about what the presenter is showing and create his/her own interpretation of things. This is a really useful technique for meditation but not so much for work meetings
Finally, the thing that annoys me the MOST is, a lot of little conversations happen throughout the room during the meeting and it sounds like the remote employee is in the fish market and has no clue of what is happening
So, how to avoid these problems?
Be cognizant of the fact that there are remote employees/attendees in the meeting
Ensure you announce the people who are present in the room
The facilitator should ensure there is a web-cam so that the attendees of the meeting can see each other and this gives a feeling of inclusion
Ensure there is only one conversation-taking place at any point of time during the meeting. Also, ensure we check in periodically with remote attendees in case they have any questions or things they want to add to the current conversation
Try to use remote collaboration tools like Google Hangouts, Skype, Zoom, WebEx and other softwares that help to bring everyone together and encourages more collaboration
Act like an adult and stop putting things on the table really hard, banging on the table or chomping on food near the speakerphone
Organizing papers into physical folders has been a productivity hack for many decades now. The same applies to electronic content as well. On a daily basis we get numerous emails and also have a lot of content on our own laptops that keep polluting our desktop screen. A good way to handle this electronic clutter is to use email filters to automatically sort incoming emails into their respective folders and also have a folder structure in our laptops to put relevant content in the appropriate buckets respectively.
Email has become the universal defacto standard for communication. Research shows that globally a staggering 269 billion emails are sent each day. It’s estimated that by the end of 2021 over 316 billion emails will be sent each day and there will be 4.1 billion email users – that’s over half the entire world’s population.
Above being the situation, how do we ensure our email communications are useful, productive and less time consuming to read. Here are some tips for that-
E-mail should MOSTLY be in 3-4 bullet points, highlighting the key things we want to convey. If there is more information to convey we are better off talking to the person directly or calling over the phone
E-mail with more than 2 e-mail threads is an immediate RED FLAG; it should be stopped then and there. It is like a virus that is going to start spreading and affecting everyone’s productivity and time. This is a sign that the people involved need to talk directly or in the worst case scenario have a short meeting ONLY with the people necessary to get clarity on things.
It should fit within a normal laptop screen resolution about 11-13’’ without needing to scroll
On a daily basis, there are numerous follow ups to do, timely tasks to accomplish and miscellaneous things we need to take care off; at a certain time of the day, week or month. To ensure we do not forget any of these things it is a good idea to set reminders. There are various ways to set reminders for ourselves. I personally set reminders using google calendar, sticky notes and Asana the task management tool. Usually sticky notes go on my table and google calendar reminders help me access them online at any place and at anytime as they seamlessly sync with all the devices.
Coming to work early
This is one of the most overlooked aspects of productivity. When we come early to work and there is no one in the office; we can get so much stuff done even before the regular day starts. For example – Say the usual work hours of your office is from 9 AM – 6 PM, just by coming in at 7 AM and getting some high priority work done before the day starts, gives a huge feeling of accomplishment and enables you to do highly focused, uninterrupted sessions of work.
Working from Home
Nowadays, more companies are encouraging their employees to adopt more flexible work from home options; as they are able to get a lot more work done. They do not have to waste time in commuting to and from the office and getting distracted with constant interruptions at the workplace. According to a recent study employees who work from home at least once a month are 24% more likely to feel happy and productive at work. Another study found companies that allow remote work see 25% less turnover than companies who don’t.
The human mind can focus only for a maximum of 45 minutes at a stretch. After which, it is necessary to take a 5 to 20 minute break to recharge. In the book Deep Work, Cal Newport suggests having 1 hour Time Blocks and then taking 10 min breaks in between. He suggests doing 3-4 time blocks of highly focused productive work per day.
I currently have a 100% remote job. This being the case it becomes all the more important to have some routines to do focused work. I end up doing 3-4 timeboxes session/day with a 5 to 10 minute break.
Breaking for Lunch
We need to break for lunch and physically get out of the office to recharge. We can do a lot of activities during our lunch break like reading, listening to podcasts, watching TV, hanging out with co-workers or just sitting by the sun and enjoying nature. Some people choose to work out during this time as well. There is scientific research that shows the value of having well defined lunch breaks to recharge our minds and help us be productive for the rest of the day.
Being Mindful and doing focused work
On an average people spend about 4 hours a day on their smartphones. Half of those is in using Facebook, Instagram, Snapchat, Twitter and Youtube. This is 20 hours/week out of a 40 hour workday. This being the case, it becomes all the more important to track how much time is spent on your phone to increase productivity at work. Apple came out with Screen time; an app inbuilt into the operating system which tracks phone usage. There is another app I personally use call Moments that also has a feature to exclude apps that you want to ignore as part of your phone usage tracking like listening to Spotify while working.
Also there is research which suggests that, it takes 23 minutes and 15 seconds to get back concentration on your original task after interruption. At work we have constant interruptions that prevents us from doing good quality work. To avoid these interruptions at work we can do the following-
Book a conference room or find a quiet place to do focused work
Put our phones and laptops on Do Not Disturb mode to prevent getting distracted from messages from our phones or other communication channels like Slack
Finally, I personally have found a lot of value from doing meditation before starting the day. There are various benefits in doing meditation; one of which is to become more mindful and focused in work and life. I personally use the Headspace app for meditation in the morning. They have different guided exercises to help reduce stress, increase creativity, be more productive and be aware of your breathing throughout the day.
After family, work is where we spend the majority of our life time. That being said, why not make it a fun experience getting to know our team and co-workers on a personal level? It is good to be social and approachable to people; at the same time. There are different tips to do this-
Try to hangout with your coworkers one day a week/month. You could do some social activity with them and get to know each other
Make it a point to smile and say “Hi” to at least 2 people every day. This simple gesture can change your work and personal life dramatically
Appreciate Good Work
People value words of encouragement and appreciation more than monetary benefits. There are numerous research that have proved this point. This being the case, it helps to build better relationships through words of appreciation. We could send notes of appreciation via emails, thank you notes and letting other peers know when someone does a great job; that made a positive impact on another individual or team.
We could say automation is the whole raison d’être for software development. As developers, we seek to employ automation in order to solve problems with more efficiency than before. And we solve problems not only for our clients or employers but also for ourselves. We write scripts and software utilities to automate the packaging and deploy of our applications. We employ plugins and other tools that can automatically check our code for common mistakes and even fix some of them.
Another instance of automation is browser automation. And that’s what this post is all about. If the term doesn’t ring a bell, never fear. The post will do justice to its title and answer the question it poses. And after defining the term, we’ll proceed to show scenarios where browser automation is the right tool for the job. Then, to wrap up the article, we’re going to give you tips so you can get started with browser automation ASAP. That’s what, why, and how in just a single post.
Let’s get started.
Browser Automation: Definition
We’ll start by defining browser automation. We could try something like “‘Browser automation’ means to automate the usage of a web browser” and leave it at that. But that would make for a definition that’s both technically correct and useless unless we define automation. That word is one that we often take for granted, so I think it might be useful to actually take a step back and define it.
1: the technique of making an apparatus, a process, or a system operate automatically 2: the state of being operated automatically 3: automatically controlled operation of an apparatus, process, or system by mechanical or electronic devices that take the place of human labor
Interesting. Now take a look at Wikipedia’s definition:
Automation is the technology by which a process or procedure is performed with minimum human assistance
Bots Don’t Get Bored
What do those two definitions have in common? At least for me, the point that’s really obvious is that automation seeks to remove human intervention from the equation. And why would we want to do that? While we humans are great at a lot of things, we’re also terrible at a lot of things—especially tasks of a repetitive nature. When performing repetitive, boring tasks, we tend to get…well, bored. Our mind easily zooms out of focus as we enter autopilot mode, and soon we’re making mistakes.
But since we’re a pretty smart species, we came up with a device that’s way better—and faster—than we are at performing repetitive tasks. And of course, you know I’m talking about the computer. With all of that in mind, here comes my upgraded definition for browser automation:
Browser automation is the process of automatically performing operations on a web browser, in order to achieve speed and efficiency levels that wouldn’t be possible with human intervention.
It’s far from being a perfect definition, but it’s already something we can work with.
Browser Automation: Scenarios for Usage
Why would someone want to automate the operation of a web browser? As it turns out, there are plenty of use cases for browser automation, and that’s what this section will cover.
Automatic Verification of Broken Links
It’s frustrating to click on a link only to see the infamous “404 Not Found” message. If you have a site, then you should definitely fix the broken links in it or, alternatively, delete them. But before you go about doing that, you first need to find them. This might not prove too much of a problem if your site has just a handful of pages. But think about a complex database-backed portal, with hundreds or even thousands of pages, mostly dynamically generated!
Now, what before was a minor nuisance becomes a herculean task. And that’s where browser automation fits in. You can employ tools that will automatically go through your site, verifying every link and reporting the ones that are broken.
Performance is a huge concern when talking about software development. In this era of high-speed connections, most users will get frustrated if the site they’re trying to access is even slightly slower than they’d expected. Besides, Google itself penalizes slower sites on its search result pages.
Browser automation can also help with that. It’s possible to employ browser automation tools to do load and performance testing on your websites. This way, you can not only verify your web app’s performance on the average case but also predict its behavior under the stress of traffic that’s higher than usual.
Web Data Extraction
When the World Wide Web was invented 30 years ago, its purpose was to allow researchers to easily propagate their works. In other words, humans put stuff on the web for other humans to consume. In the decades that followed, we watched a rise in the non-human use of the web.
Browser automation definitely plays a part in this. Web data extraction, also known as web scraping, is another use case for browser automation tools. From data mining to content scraping to product price monitoring, the sky is the limit for the uses of web data extraction.
Last but not least, we have what’s probably the poster child of browser automation use cases: automated testing. Yes, we just talked about performance testing and broken link verification, and those things are also automated tests. But here we’re talking of general, end-to-end functional tests. For instance, you might want to check that, when informing an invalid login and/or password at a login screen, an error message is displayed.
Such tests really shine when you can effectively use them as regression tests. If a fixed problem returns in the feature, you have a safety net that will warn you. And that safety net is way faster and more efficient than human testers—at a fraction of the cost.
How to Get Started With Browser Automation
Learning browser automation can seem like a daunting task. It’s an enormous topic, and there’s a lot to know. But it’s no different from any other area in tech. Approach it the way you would approach learning a new programing language or framework: by doing it.
First, think of at least one use case for browser automation in your current organization. We’ve just shown you some, and I’m sure you can think of many more. Some people call this “scratching your own itch,” and it’s an effective way of motivating yourself to learn something.
Build a minimum viable example of browser automation in place. As soon as you get something that works, no matter how simple it is, that’s a milestone. You can use it as a foundation upon which to build more sophisticated and complex approaches.
Where to Go From Here?
Today’s post was meant to give you a quick primer on browser automation. We started by defining the term, then proceeded to show some common use cases for the technique. Finally, we gave you tips on how to get started.
As I like to say when writing introductory articles like this one, this was just the tip of the iceberg. There’s much more to browser automation than what could be covered by a single blog post. Where do you go from here then?
There’s no silver bullet: the answer is to keep studying and practicing. Continue to evolve your first minimum test suite and learn from it. You should also keep an eye out for what’s happening in the world. There are interesting developments, such as the use of machine learning to help developers with the creation, running, and maintenance of test cases.
Additionally, stay tuned in this blog for more automation-related content. Thanks for reading and see you next time!
Testim gives you the ability to playback tests in incognito mode. The reason you may want to use incognito mode is, to get the true behavior of the application without any cached data. This is similar to running tests on the grid, where in each test runs on a new browser instance without any cached data (same as running in incognito mode). The different tips to help you playback tests in incognito mode are as follows-
NOTE: Ensure you allow Testim to run in incognito, before playing the tests.
Tip 1: Running a single test in incognito
If you want to play a test you just created in incognito, follow the below steps
Click on the drop down arrow next to the play button
Click on “Run in Incognito mode”
Tip 2:Running multiple tests in Incognito
Multiple tests can be run in incognito mode by using the CLI. Each time a test is run on the grid a fresh browser instance opens up without any cached data. Follow the below steps to run multiple tests in incognito all at once-
We were recently at the STP Spring 2019 conference. Testim was one of the sponsors for the event. We were also there to give a talk and workshop on Implementing ATDD in large scale agile projects and doing Paired Session Based Exploratory Testing respectively. It was an amazing conference in terms of the content, speakers, attendees and the location.
The conference was held at the Hyatt Regency next to the SFO airport and San Francisco Bay. It was a beautiful location and was easily accessible to everyone. As for the conference, there were a great collection of talks and workshops for attendees to learn from and apply the concepts in their daily project activities. The content included different testing strategies/approaches that can be applied to manual/automated testing, applying AI in software testing, different leadership techniques and traits that can be applied in agile testing, testing in DevOps/Continuous Delivery and performance testing.
This is one of the reasons why we have continued to sponsor STP Conferences in the past couple of years; as they make testing inclusive by bringing people from different countries in one location to share their experiences and also learn from each other.
We met a lot of our friends from SauceLabs, Applitools and other companies at the conference. We also had our own sponsor booth.
NOTE: In case you are interested to test drive Testim yourself, just fill in your details here and we will hook you up with
Freebies for you and your team
Unlimited access to Testim for 14 days
24/7 Customer Support
1 Hour Free Test Design and Automation Consultation with me
As mentioned earlier, on behalf of Testim, I also gave a talk and a workshop. The talk was titled “ATDD (Acceptance Test Driven Development) Is A Whole Team Approach – A Real Case Study”. It was about my real life experiences implementing ATDD in a large scale agile project. I discussed the problems my team had before implementing ATDD and how I trained the entire team of 25 people on different practices to encourage collaboration, learning and reinstating the mindset of One Team, One Goal. I also discussed the process changes that happened due to ATDD, how my team could leverage test automation throughout this process and finally shared the lessons learned from the implementation.
The workshop I did was titled “Unwrapping the box of Paired Testing”. In this workshop, I shared different testing strategies to do quick tours on your applications based on my real life experiences. I discussed what is Session Based Exploratory Testing and used the template I formed to do paired exploratory testing on live applications.
Below are some articles I wrote covering some of the details discussed in my talk and workshop