CrossBrowserTesting.com

A Design, Development, Testing Blog

  • Product Overview
  • Pricing
  • Back Home
  • Free Trial
  • Design
  • Development
  • Manual Testing
  • Test Automation
  • Visual Testing

The State of the New Selenium IDE

November 19, 2018 By Alex McPeak Leave a Comment

Selenium ide alternatives

Selenium ide alternatives

Last week, Applitools teamed up with Simon Stewart for “Introducing Selenium IDE: The Next Generation”.

Selenium IDE is part of the Selenium suite and has been a depreciated record and playback tool, largely because it could only be used in Firefox and had stopped being supported by contributors of the Selenium project.

But don’t call it a comeback — Selenium IDE 2.0 (still to be officially named) is more so a new and improved version of its former self.

What’s New?

Some of Selenium IDE you might recognize from the first version, such as their UI. However, while it may look similar at first glance, you’ll soon notice many improvements including better locators and support for common tasks.

Potentially the biggest differentiator with the new Selenium IDE is that it’s built as a web extension, which is standardized by the WC3, so it no longer only works in Firefox.

This means that the new Selenium IDE can run in any browser that supports web extensions such as Chrome, making record and playback cross-browser testing much more achievable than in the previous version.

How to Install the New Selenium IDE, Record, and Play

In the webinar, Simon showed us how we can install Selenium IDE and run our first test.

In Firefox:

  1. Go to Tools
  2. Click Add-ons and Get add-ons
  3. Search Selenium IDE and click Add to Firefox
  4. Go to the Menu bar and select Selenium IDE

In Chrome:

  1. Go to Chrome Web Store
  2. Search Selenium IDE
  3. Add the extension (make sure to select the one from SeleniumHQ.org)

In the example, Simon does a Google search for “cheese,” which is as easy as firing up the new IDE, choosing to record a test, entering the URL you want to start with, and then going through the actions that you want recorded manually.

The new IDE also has options during testing such as assert and verify. If you want to edit the test steps after, you can do that, too.

As mentioned, there are quite a few value-add features and enhancements in Selenium IDE gathered from users over the years.

If you want to run tests with a command line, you can put tests into a CI system, or allow them to run locally with the Selenium IDE runner. The runner supports additional features such as parallel execution through a Selenium grid or a server like CrossBrowserTesting.

There are other enhancements with the new IDE, as well. Control flow statements enable more maintainable tests, whereas before, it was only available through plugins.

Additionally, fallback locators will provide better test stability and make tests more resilient despite changes. Previously, Selenium has been known as brittle and unstable because locators have been hard to write and maintain.

There currently is no option to export recorded tests like there was with the original IDE, but this is immediate on the product roadmap.

Selenium IDE Alternatives

As we discuss Selenium IDE, the conversation around record and playback tools is brought back into light.

More and more individuals and organizations are realizing the value of record and playback tools like Selenium IDE and Selenium IDE alternatives, such as Record and Replay in CrossBrowserTesting.

Both of these tools are ideal for the use cases that Simon reviewed in the webinar. Record and playback is helpful for:

  • Team members that don’t aren’t familiar with programming languages
  • Someone who wants to put together a bug report
  • Someone just getting started with automating a test suite
  • Automating boring and repetitive tasks

Of course, the benefits of Selenium IDE and its alternatives don’t stop there — the more teams adopt record and playback tools the more uses they’ll find.

So, whether you decide to stick with Selenium or try a tool like Record & Replay, it’s worth exploring the possibilities of a record and playback tool.

Filed Under: Selenium Tagged With: record and playback, record and replay, Selenium, selenium ide, test automation

Introducing Scheduling for Record & Replay and Automated Screenshots

November 13, 2018 By Alex McPeak Leave a Comment

automated test scheduling record and replay screenshots

automated test scheduling record and replay screenshots

This year, we introduced Record & Replay for teams that want to automate tests without scripting. This method of codeless automation has allowed teams to maximize the value of every manual test by reducing execution time while increasing speed and coverage. And just like with Selenium testing, once your tests are recorded in Record and Replay, you can run them in parallel to get even more out of each suite.

Additionally, when paired with automated screenshots, teams of any skill level have the ability to visually and functionally verify their web application on thousands of browsers at once. By leveraging our Comparison Engine, you can take visual testing to the next level by evaluating differences that are highlighted at the pixel level.

Now with Scheduling for Record & Replay and automated screenshots, you can set tests to run on a daily, weekly, or monthly basis and have the results sent to you via email or Slack. Scheduling is the next step in helping our customers achieve continuous testing without needing to learn highly technical CI tools like Jenkins, TeamCity, and VS Team Services.

If you’re thinking this sounds too good to be true, find out how easy it is to get started with Scheduling in CrossBrowserTesting and see for yourself.

How to Get Started With Automated Test Scheduling

For Record and Replay:

  1. Go to Replay a Suite under Record & Replay in the CrossBrowserTesting app
  2. Select one of your suites. Note: You need a previously saved suite in order to schedule a Record & Replay test. Follow these directions to find out how to create a Record & Replay suite.
  3. Scroll down to “Suite Schedules” and click “Add Schedule”
  4. Decide if you want to run the suite on a daily, weekly, or monthly schedule and set a time for it to run. Choose if you want notifications via email or Slack and select “Add Schedule”

For Automated Screenshots:

  1. Go to View Test Results under Screenshots in the CrossBrowserTesting
  2. Select which screenshot test you’d to schedule and click “Test Results”. Note: You need to have previously run a screenshot test in order to schedule one. Follow these directions for how to take an automated screenshot of your website.
  3. Click “Add Schedule” and set to run daily, weekly, or monthly at a time of your choosing. Select whether you want notifications through email or Slack and click “Add Schedule”

That’s it — just a few steps to functionally and visually testing your UI on a continuous basis with no code.

If you want to learn more about Scheduling for Record & Replay and automated screenshots, join us in our upcoming webinar to learn just how easy it is to start scheduling your tests today. We’ll run through the new feature and give example use cases of Scheduling that you can immediately start implementing in your workflow.

We’ll also go through CI with Jenkins to further our pursuit of continuous testing in CrossBrowserTetsing for teams that may be interested in Selenium automation.

Register for the webinar now.

Filed Under: Test Automation Tagged With: automated testing, record and replay, scheduling, screenshots

Next Steps for Teams Who Want to Move to Agile Project Management

November 7, 2018 By Alex McPeak Leave a Comment

agile project management development

agile project management development

It seems that the companies we all aspire to be more like are moving quicker and releasing faster than ever before. So, how can the rest of us strive to follow in the footsteps of software giants that release innovative software on the hour? While there may be no single, clearly-defined answer, we do know that many are seeing success with agile project management and development methods.

By focusing on feedback from stakeholders throughout the development process, not only is agile found to be a faster development method, it’s also more effective in the way that it allows and encourages changing requirements.

However, as waterfall is the traditional methodology for software development, teams that are stuck in their old ways might find the transition to agile hard to wrap their head around, so here are 7 tips for teams who want to take the next steps and move to agile project management.

  1. Identify what or who is missing to make agile work. In order to move to agile, you first have to recognize that it will be process your entire team will have to get on board with and fully embrace in order to make it work. Identify the roles and people you need on your team to make a successful transition. It might be helpful to onboard a project manager, scrum master, or agile coach to help adjust the current workflow. Look at your current team, as well, to understand where there are silos and barriers to communication. Teams that don’t communicate will find it hard to be successful. Agile project management works best when this is cross-departmental collaboration, so it’s important to work from the inside out.
  2. Prepare to shift left. Agile will require more testing earlier in the software development lifecycle. Because each phase of the SDLC is done in short iterations, rather than long incremental ones like with waterfall, testing shouldn’t wait until the end when new features are fully developed. With a focus on continuous integration and continuous delivery that comes with agile development, continuous testing will be the key to fast feedback and iterative changes that are needed to release high-quality software. Evaluate whether you will need to introduce test automation, additional QA team members, new tools, or something else to help you reach maximum test coverage.
  3. Poke holes in what you’re doing now. Look at your current planning process, and outline how your strategy will have to change in agile development to allow for more feedback and flexibility. Where are the bottlenecks in your current process, and what prevents your team from delivering high-quality software or meeting short deadlines? This will be crucial to shifting to a new way of thinking and transforming your team’s workflow. Familiarize yourself with the different agile methodologies such as Scrum, Kanban, and Extreme Programming. While these all follow agile principles, they achieve it in different ways. Based on the makeup of your team and the objectives you discussed, it will affect the way you carry out agile project management.
  4. Get on board with sprints and standup. No matter which methodology you choose, a few things will probably be the same, and they’ll help you properly implement agile project management in your organization if you take the time to do them correctly. Sprints will be the duration of you planning — usually they’re two weeks long but can be anywhere from one to four — and standups are where you talk about what you’ll be doing in each sprint. Take advantage of these opportunities for strategic planning and collaboration with the entire team.
  5. Backlog issues and tasks. Identify the projects that currently challenge your team and what you’d like prioritize when you transition to agile. Create a backlog of tasks, gaps, objectives that need to be addressed so you can start ranking them on most to least important and having conversations about future goals. Discuss what is needed from each team member, how it will be accomplished, and what information is currently needed to make it as “done”. Once you begin to organize your team and the work that needs to be done, you can start building out detailed tasks and sprints.
  6. Don’t skip your retrospective. As you adjust to agile and the many changes that come along, you’ll be constantly learning about what’s working well and what isn’t, as well as what individuals are successful with and what they’re struggling with. Ensure that everyone has an equal say in each sprint, so it’s not just leaders and managers giving their two centrs. Focus on how you can improve in each sprint. However, don’t just wait until retrospectives to collect feedback from your team — encourage communication and checkins throguhout the sprint.
  7. Be open to change. Requirements change, tasks get de-prioritized, clients and customers change their mind, and feedback will alter the sprint process. The nice thing about agile project management is that it encourages these adjustments. Embrace agile and understand that these frequent changes are improvements that will help your team achieve continuous integration, testing, and delivery. If you feel like you’re getting lost or confused, always resort back to the agile manifesto to realign your team with the principles behind agile.

Finding your groove with agile won’t happen overnight, but there are certain steps your team can take to make the transition more seamless. For more, take a hint from what agile teams can learn from Netflix.

 

Filed Under: Test Automation Tagged With: agile, agile development, test automation

Upcoming Webinar: Achieving Quality Without a Dedicated Test Team

October 31, 2018 By Alex McPeak Leave a Comment

yesware qa testing software engineer developer webinar

yesware qa testing software engineer developer webinar

As teams shift left, adopt new methodologies, and take on new testing strategies, the role of software developer v.s. testers is becoming more blurred. In fact, many modern software teams no longer work according to these rigid roles.

Meghan Munseeney is a Software Engineer at Yesware who also has a hand in Quality Assurance. This means she’s involved throughout the software development lifecycle from code changes to production, operations, and customer escalation.

In fact, this is a commonality among the software engineers at YesWare, since the organization has no dedicated QA team. However, Yesware is constantly able to release great software to customers thanks to star talent like Meghan.

Join CrossBrowserTesting and Meghan Munseeney on Tuesday, November 13 at 2 PM ET for “Achieving Quality Without a Dedicated Test Team” to find out how software companies like Yesware are adapting to modern testing practices by arming every role with the skills they need to be successful in an ever-changing environment.

In this webinar you will learn:

  • What the Yesware quality process looks like
  • How Yesware handles testing without a dedicated QA team
  • How Software Engineers and Developers can play a larger part in quality
  • Q&A with Meghan

Register now.

Filed Under: Test Automation

The Faces Behind Selenium

October 18, 2018 By Alex McPeak Leave a Comment

selenium contributors committers webdriver facesselenium contributors committers webdriver faces

selenium contributors committers webdriver facesselenium contributors committers webdriver faces

The CrossBrowserTesting team is getting excited for SeleniumConf. But as we settle in to Chicago, we wanted to take a look back at Selenium’s rich history to highlight some of the faces behind Selenium and meet some of the contributors who’ve made the popular open source automation tool what it is today.

So put a face to the name (or should we say a name to the tool?), and enjoy SeleniumConf Chicago knowing that you are properly brushed up on your Selenium knowledge.

Note that there are plenty more people who have committed to Selenium, so check out the list of contributors on the site. And if you’re feeling inspired, find out how you can get involved with Selenium yourself.

Simon Stewart – Simon Stewart, a.k.a the creator of Selenium Webdriver, is well known by the Selenium community — and for good reason. He’s also a lead Selenium developer, specifically on Selenium 2, and a frequent speaker at conferences, which means you won’t want to miss his “Selenium: State of the Union” keynote at SeleniumConf. He currently works as a Software Engineer at Deliveroo and has roots at Google, Facebook, and Thoughtworks. Additionally, as Selenium goes through the W3C specification process, Simon is co-editor.

Jason Huggins – Selenium IDE was originally developed by Jason Huggins when he worked at ThoughtWorks in Chicago in 2004 — making the location of this year’s Selenium Conference fitting. Huggins worked heavily on developing Selenium RC, Selenium Ice (the IE browser extension), and Selenium Core. He was also responsible for naming Selenium, jokingly dubbed as a cure to a competitor called Mercury.

Paul Hammant – Paul Hammant joined Thoughtworks and helped move the project towards creating Selenium Remote Control (Selenium RC). While Selenium RC is no longer supported today, Hammant played a critical part in Selenium’s evolution.

Phillipe Hanrigou – In 2008, Phillipe Hanrigou created Selenium Grid and was a committer of Selenium RC. Selenium Grid is a server that allows you to run tests on remote machines at the same time through a hub and multiple nodes in order to speed up testing. This method is known as parallel testing, and today it can be achieved through this Selenium Grid or with a cloud testing tool such as CrossBrowserTesting.

Jim Evans – Jim Evans is no newbie to the software industry. In fact, he’s been part of it for 25 years, working at some major companies including Microsoft, Inuit, and Salesforce, where he works today. Evans is on the Project Steering Committee, and most notably built the IE driver and the .net language bindings. As a contributor to Selenium since 2010, this just skims the surface of all the work he’s done for the project, as well as many other open source projects. But fair warning, #neverflywithjimevans or you may not make it to SeleniumConf on time.

Aslak Hellesoy – Aslak Hellesoy is one of the first contributors to Selenium, but his list of achievements doesn’t stop there. He’s also the creator of Cucumber and co-founder of Cucumber Ltd. Don’t miss his SeleneiumConf talk on “Sub-second Acceptance Tests” where he’ll discuss techniques for making functional acceptance tests run in a fraction of the time.

Ashley Hunsberger – Ashley Hunsberger is a member of the Selenium Steering committee, but you may know her better as co-chair of SeleniumConf, which means she helped put together the killer lineup you’ll be experiencing. If you see her this week, make sure to commend her on her hard work bringing together a great community of Selenium contributors, users, and enthusiasts alike.

Filed Under: Test Automation

Why Safari 11 Tracking Prevention Has Advertisers Up in Arms

October 16, 2018 By Alex McPeak Leave a Comment

Safari 11 tracking prevention itp

Safari 11 tracking prevention itp

Apple’s Intelligent Tracking Prevention (ITP) feature was first released earlier this year at WWDC in an effort to increase consumer trust in Apple. ITP makes it harder for businesses to track peoples’ web use for advertising, and with the latest Safari 11 upgrade, Apple has made it even more difficult.

ITP 2.0 uses machine learning to detect whether cross-site tracking cookies from third-party networks can be used for retargeted ads. If so, those cookies only work for 24 hours and are wiped completely in 30 days. Cookies are basically small trackers that follow you around the web and store information about the content that you’re visiting and the actions you’re taking.

By limiting these cookies, it’s harder for online retailers to follow your browser trail. For example, if you were to look at a couch on an online furniture store, that furniture company might use cookies to advertise the item to you at a later time because you are more highly targeted and thus more likely to buy.

While Apple’s limitations are clearly in favor of customers who may find modern advertising tactics aggressive and prioritize data privacy, marketers depend on this information and have been using it for years. Especially as high-traffic shopping occurrences such as Black Friday, Cyber Monday, and the rest of the Winter Holiday season are upon us, ITP could affect the end of the year bottom line for many businesses.

In fact, six major advertising companies recently issued an open letter expressing their concern about the latest Safari 11 version. The letter states that with cookie-blocking technology as part of Safari 11, Apple is “sabotaging” the economic model of the internet.

Additionally, advertisers depend on cookies in order to personalize content. According to Adweek, the letter also stated, “Blocking cookies in this manner will drive a wedge between brands and their customers, and it will make advertising more generic and less timely and useful. Put simply, machine-driven cookie choices do not represent user choice; they represent browser-manufacturer choice.”

Perhaps this wouldn’t be so much of an issue if Apple devices weren’t as prominent as they are. Apple devices take up approximately 44 percent of all mobile devices in the US. And, unlike how Android suffers from fragmentation across operating systems, the majority of Apple users are quick to upgrade and are using Safari 11.

However, just because advertising tactics suffer on new devices doesn’t mean quality has to. While marketing teams struggle to find workarounds for ITP, software teams can continue to test on the newest mobile operating systems and devices with tools like CrossBrowserTesting.

By testing on Safari emulators and real devices, you can see exactly what your users are seeing when they visit your site on Safari 11. Hopefully, if retargeting doesn’t get them to come back, a great web experience will.

Filed Under: Mobile Devices Tagged With: emulators, mobile devices, safari, safari 11

Last Minute Web Testing Checklist for Black Friday, Cyber Monday, and the Holiday Season

October 12, 2018 By Alex McPeak Leave a Comment

web testing checklist cyber monday

cyber monday testing
It may seem like the Holiday season is a ways away, but time flies (doesn’t it feel like the year just started?). Your QA team has probably been preparing their web applications for the traffic of Black Friday, Cyber Monday, and the rest of the holiday season for some time now.

But if you’re scrambling to get everything done in time, are not totally sure everything that should be done, or just wanted to make sure you’re checking all the right boxes, we’ve put together a last-minute web testing checklist to ensure your site runs flawlessly. And to make sure you avoid the same fates of other companies’ bugs and crashes.

Prepare your site so you don’t lose customers when it matters most. With the help of SmartBear tools like CrossBrowserTesting, Alertsite, and LoadUI, you can be confident in your website 365 days a year.

Test Planning

  • Run a risk analysis of your application to understand which pages receive the most traffic, as well as which are business critical
  • Put a plan in place for in case your site experiences higher traffic than expected. Come up with a strategy for getting the website back up
  • Consider creating a special error page so that customers are aware of the issue in case of downtime
  • Use Google Analytics or Mixpanel to check which are the most popular browsers configurations your current audience is using.
  • Check a site like Statcounter to evaluate which browsers, operating systems, and devices are the most popular overall

Functional Testing and Usability

  • Check essential business functions such as login, product pages, add to cart, search and filtering capabilities, and navigation
  • Test form fields and dropdowns and make sure the application responds correctly if something is not filled out. This may differ based on whether the field is optional or mandatory
  • Test that product prices are correct and shipping charges are accurate. If these changes based on location, account for it in testing
  • Make sure payment transactions are fully functional and can accept deals and promotions. Check algorithms, transaction, calculations; and ensure that it checkout works for all available forms of payment
  • Perform negative testing to discover which user actions are most likely to break the application
  • Test links to make sure none are broken
  • Manually test a full workflow to analyze the usability and functionality of a complete buyer journey
  • Use personas during exploratory testing to perform tests that account for different user journeys
  • Functionally validate through Live Testing, Record & Replay, and/or Selenium Testing

Security Testing

  • Perform penetration testing to check your application for weak spots that could compromise customer data
  • Integrate security testing into your automation with open source tools like ZAP
  • Ensure the encryption of passwords, payment information, and other sensitive data
  • Implement multifactor authentication for increased security of your users

Browser & Mobile Testing

  • Identify the most common and problematic browsers and operating systems for testing
  • Test to make sure media such as sound, videos, and images are working correctly. If you have a dynamic web page, make sure it looks as intended on different browsers
  • Identify which mobile devices you need to test on and assess responsive design
  • Mobile devices suffer from more environmental factors than a typical desktop application. Determine how your site works on a device with a poor network connectivity or low battery
  • Use real devices to get a feeling for the usability of your application on mobile

Visual Testing

  • Visually validate your website with screenshot comparisons to evaluate at a pixel-level
  • Take screenshots locally or behind a firewall using Local Tunnel to test visual elements before pages go to live to the public
  • Go through your application Live Testing to evaluate visual efficiency over multi-step scenarios
  • Make sure elements like buttons, images, and text are consistent across browsers
  • Conduct visual regression testing to ensure the layout remains stable over new iterations

Test Automation

  • Use test automation for regression testing to make sure functionalities remain stable through code changes
  • Automate small, repetitive, and business-critical test cases at the UI level
  • Analyze test results to identify where you have the most pertinent bottlenecks and commonly run into failures
  • Automate your tests against real desktop and mobile browsers with Selenium. Take your scripts to the cloud with CrossBrowserTesting to acesss 1500+ browsers
  • Leverage parallel testing to run automated tests across more browsers in less time

Load Testing and Monitoring

  • Get an estimate of how many users you expect will be landing on your site at peak times
  • Check site speed with performance and get response times for different connection speeds
  • Use load testing to determine behavior under peak traffic loads
  • Utilize pre-built load templates or customize your own to see how your website or API handles different traffic volumes
  • Stress test to get a reading on what the maximum load is before your application is unresponsive or crashes
  • Set up Uptime Monitoring to ensure you’re alerted immediately if your site crashes
  • Begin monitoring the month before so you have a benchmark to alert against
  • Enable testing and monitoring over complete user journeys and flows so customers don’t run into errors after venturing from the home page

Filed Under: Test Automation

Windows 10 Update Wipes Files, But You Can Still Safely Test on Edge 18

October 10, 2018 By Alex McPeak Leave a Comment

Windows 10 october 2018 update

Windows 10 october 2018 update
On October 2, Microsoft released the Windows 10 October 2018 Update, which was due to include new features such as cloud clipboard, dark theme, search previews, Edge improvements, and a new screenshot tool.

However, the positives didn’t quite outweigh the negatives when the update started deleting files, leaving Microsoft to pull the update just four days later.

“We have paused the rollout of the Windows 10 October 2018 Update (version 1809)* for all users as we investigate isolated reports of users missing some files after updating,” said Microsoft on its support site.

This isn’t the first time this year that Microsoft has experienced issues with an update. They were forced to delay the April 2018 Windows 10 Update over Blue Screen of Death issues. However, it’s rare that they pulled it completely.

Users are looking to Microsoft for answers on how this went wrong, especially when they were warned about the bugs before shipping the updates. Testers reportedly submitted the bugs, which were ignored as low priority. Additionally, Microsoft rolled the update out in beta through the Windows Insider program where the same issues were flagged.

Now, Microsoft is re-releasing its Windows 10 October 2018 update to Windows Insiders after identifying and fixing all known issues in the update, and conducting internal validation, according to Microsoft Director of Program Management for Windows Servicing and Delivery, John Cable. Once they collect further feedback and make sure there are no more problems with the bug, they will release it to the public.

Since the bug was previously reported and the update went out regardless, Microsoft stated that it will be implementing changes to the feedback tool so that they can specify the priority of found bugs during beta. While we think any user-reported bugs should be taken seriously, hopefully, this will help avoid future issues when it comes to rolling out updates.

Microsoft found that the reason for the deleted files was a bug related to Known Folder Redirection, a feature that users can enable to move their folders. The code, which was introduced in the latest update, was supposed to delete empty and duplicate known folders, but it apparently had issues identifying which ones were the right candidates for deletion.

So, what’s one to do if they want to test the newest browsers and operating systems, like Windows 10 and Edge 18, without corrupting their computer with an update? As Windows tries the new rollout with Insiders, how can users safely access what they need until the conflict is officially resolved?

While many Windows Insiders have been quick to install the October update, CrossBrowserTesting users had the advantage of simply accessing Edge 18 and Windows 10 in the cloud, without compromising important files. This means no updating your operating system or browser, and no losing your files, because sometimes it’s better to be safe than sorry with new software.

For those who simply wanted to experience the new features that were expected to come with the OS update — what do you do if you’ve already updated and are missing files?

Microsoft says if you were one of the rare cases that did suffer from file deletion, you can bring your computer to Microsoft Support, and they should be able to recover lost data. Otherwise, Microsoft suggests you minimize your use of the device. Good luck with that.

Filed Under: Browsers Tagged With: browser update, Edge, operating systems, Windows

The Top 5 Things We Learned in Our Webinar with Bas Dijkstra

October 9, 2018 By Alex McPeak Leave a Comment

Bas Dijkstra Making Your Automation Suite LeanerBas Dijkstra Making Your Automation Suite Leaner

Recently, Bas Dijsktra of On Test Automation joined the CrossBrowserTesting team in the webinar “Lighten Up: Methods for Making Your Automation Suite Leaner ”.

Bas’s presentation was jam-packed with important lessons and actionable takeaways. To get the most out of it, you should take the time to watch the full webinar at the bottom of this post.

But we’re also rounding up a few of the most important lessons we learned from Bas. Here are our top five:

  1. There’s such thing as too much automation – With the introduction of tools like Selenium that allow us to automate at the UI level across different browsers, it can be tempting to automate anything we know how to write a test for. However, automation isn’t always the answer, and if you’re automating too much, it may be more of a problem than a solution when your automation suite becomes bloated. This can mean slow tests, shallow feedback, and high maintenance costs that reverse the benefits of automation. Additionally, when your suite is too heavy with automation, it no longer helps to shorten your feedback loop, and will likely add time instead. In order to get the most value out of your automation suite, Bas says that it’s important to understand where you should be testing at the UI level, when you should be testing at a lower level, and when to skip automation altogether.
  2. We have some unrealistic expectations around automation – Automation should never be the end goal of our testing. Bas advocates that we stop trying to automate everything and start focusing on automating the right things. Prioritize the business value rather than automating just to automate. Understand that not everything testers do can be automated, and not all test should be automated. Know the limitations of automation and your testing tool, and familiarize yourself with the tests that could be taken out of your suite to lighten your load to improve your feedback loop.
  3. Automation requires resources – One of the reasons why it may not be worth it to automate is return on investment, or ROI. Automation requires resources to write, maintain, run, and analyze tests. Bas says that this is too often forgotten when teams strive for “complete automation”. You have to decide whether it’s worth it to expend this energy and resources on automation, or if it would be best spent somewhere else. For example, maybe it would be more valuable to do an exploratory test of your application and do a deeper dive into areas you can’t assess with automation. Ask, “Are we comfortable not having the information provided by this test?” If you are, it might be a reason to redirect your resources away from automation.
  4. Not everything should be tested from the end user perspective – UI testing is great to test the end user perspective, but it’s not always the best method. You should automate as close to the implementation as possible and only do user interface-driven end-to-end automation when verifying end-user journeys. Ask, “where is the logic that we’re verifying actually implemented?” Often times you can run a test in the UI, but it won’t give you the feedback you’re looking for. In his example, Bas shows there are instances where testing at a lower level will give you more accurate test results.
  5. You might not need to run your automation suite as often as you think – UI tests can take a long time to run, and with multiple browsers and operating systems, it can take even longer. While tools like CrossBrowserTesting allow you access to a seemingly unlimited amount of browsers, that doesn’t mean you have to test in them all every time. Bas encourages you to decide which browsers you need to test and how often by looking at which your users are on and which are most problematic. If you think there’s value in testing in a browser or operating system but not adding it to your regression suite, CrossBrowserTesting lets you look at those same configurations in on-demand so you can test manually, as well. Bas also suggests moving tests out of the build pipeline and into an overnight job, so you’re not spending as much time running your suite.

Conclusion

As teams become better acquainted with automation, they have certain choices to make about what to automate, how to automate it, and why it should be automated. Unfortunately, sometimes we don’t ask these questions first and end up with a bloated test automation suite. Bas Dijkstra gives valuable advice for considering will actually set you up for success and give you more valuable test results.

To watch “Lighten Up: Methods for Making Your Automation Suite Leaner ” play the video below.

Filed Under: Test Automation Tagged With: api testing, Selenium, test automation, ui testing, webinar

3 Easy Tutorials for Getting Started with Selenium

October 4, 2018 By Alex McPeak Leave a Comment

selenium tutorial easy beginners webdriver with examplesselenium tutorial easy beginners webdriver with examples

selenium tutorial easy beginners webdriver with examplesselenium tutorial easy beginners webdriver with examples

You’ve learned your first programming language. You’ve familiarized yourself with Selenium. You’ve got a great Selenium testing tool and a great team to support you. You know what to automate and what not to. But where do you start with your first test?

No matter how prepared you are, getting started with Selenium can be intimidating. But by starting small and getting some of those repetitive tests out of the way, you can get your bearings while building a maintainable and reusable automation suite.

If you work in ecommerce, there are a few test cases you might come across regularly: sign-up, login, and sign out. The good news is that these user stories are fairly easy to automate, and once you understand how to set them up, it’ll be easier to start building your own tests in the future.

SignUp

The signup process will differ from site to site, but there are a few patterns that will tend to repeat themselves. For example, many will have multiple pages with “next” buttons, dropdown menus, and form fields to fill out.

Let’s go through what a test case would look like if you were automating a signup for Gmail.

First, we want to import WebDriver as well as the “Select” command we’ll be using:

from selenium import webdriver
from selenium.webdriver.support.select import Select
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait

Next, we need to instantiate an instance of ChromeDriver, the guy who will be driving our browser:

driver = webdriver.Chrome()

Now we want to define a method, so you can reuse this test, and navigate to Gmail.com where we’ll click “Create an Account” using the element id:

def site_signup():
driver.get(“https://gmail.com”)
driver.find_element_by_id(“Get Gmail”).click()

Clicking should take us to a new tab, then we’ll want wait for the page to load completely so that the form to create your Google Account appears:

WebDriverWait(driver, 10).until(EC.title_contains("Create Your Account"))

Here you find multiple form fields including First name, Last name, Username, Password, and Confirm password. This script will fill all these fields and click next:

driver.find_element_by_id (“firstName”).send_keys(“Mark”)
driver.find_element_by_id (“lastName”).send_keys(“Zuckerberg”)
driver.find_element_by_id (“username”).send_keys(“MZuckerberg”)
driver.find_element_by_id (“password”).send_keys(“Harvard2004”)
driver.find_element_by_id (“confirmpassword”).send_keys(“Harvard2004”)
driver.find_element_by_id (“Next”).click()

Again, this will take to to a new page where you’ll want to wait until it shows all the form fields for “Create Your Account”. It will then request you fill out more form fields. These will have drop down boxes:

def droppable()

select_fr = Select(driver.find_element_by_id("Month")) select_fr.select_by_index(May)
select_fr = Select(driver.find_element_by_id("Day")) select_fr.select_by_index(14)
select_fr = Select(driver.find_element_by_id("Year")) select_fr.select_by_index(1984)
select_fr = Select(driver.find_element_by_id("Gender")) select_fr.select_by_index(Male)

driver.find_element_by_id(“Next”).click()

From here, you agree to terms and conditions, which means you have to scroll down until you see the “I agree” button:

element = driver.find_element_by_id('I agree') element.location_once_scrolled_into_view

driver.find_element_by_id(“I agree”).click()

That’s it! If you follow these steps, it should create a Gmail account.

Log In

Once you get some of those trickier commands out of the way with sign up, these test cases should be easy. As we mentioned, you’ll see how you build on your previous learning to create new tests, such as with this login that uses find element by id, send keys, and click that we just used.

This is what a login with Facebook might look like (we hope that Mark doesn’t actually use the same password for Gmail and Facebook…and we also hope it’s more secure than Harvard2004):

def site_login():
driver.get (“facebook.com”)
driver.find_element_by_id(“ID”).send_keys(“MZuckerberg”)
driver.find_element_by_id (“ID”).send_keys(“Harvard2004”)
driver.find_element_by_id(“submit”).click()

LogOut

Logouts are usually pretty simple as well, but you will probably have to find settings or menu through a drop down. This is what the test would look like if you wanted to log out of Facebook:

def site_logout():
driver.get (“facebook.com”)
driver.find_element_by_id(“userNavigationLabel”).click()
driver.find_element_by_partial_link_text(“Log Out”).click()

You can see here that we switched up the way we located the element (by name instead of id) because of the nature of the dropdown window. Keep in mind there are multiple ways to locate an element if one doesn’t work out, including:

  • ID
  • Name
  • XPath
  • Link Text
  • Partial Link Text
  • Tag Name
  • Class Name
  • CSS Selector

Conclusion

Even if you don’t own a site that includes sign up, login, or log out, practicing tests similar to these will teach you some of the foundations of Selenium, popular commands, and good practices so you can continue to build and improve your Selenium test automation strategy.

To find more common commands that you may run into when building out your Selenium tests, check out our full Selenium toolkit, which includes more Selenium tutorials.

Filed Under: Selenium Tagged With: beginner, Selenium, test automation, tutorial

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • …
  • 17
  • Next Page »

Try CrossBrowserTesting

Everything you need for testing on the web. Browsers & Devices included.


  • Grid In The Cloud
  • Simple CI Integrations
  • Native Debugging Tools
  • Real iOS and Android
  • 2050+ Browser/OS Combinations
  • Intuitive REST API

Start Testing Today

Want Testing Tips?

Want the latest tips & strategies from industry experts right to your inbox? Sign up below.
 

Join Over 600,000 Testers & Developers And Start Testing Today

Learn more Free Trial

Features

  • Live Testing
  • Selenium Automation
  • Automated Screenshots
  • Screenshot Comparison
  • Local Testing
  • Real Devices

Solutions

  • Automated Testing
  • Visual Testing
  • Manual Testing
  • Enterprise
  • Internet Explorer

Resources

  • Browsers & Devices
  • Blog
  • Webinars
  • Integrations
  • ROI Calculator

Company

  • About Us
  • Careers
  • Plans
  • Terms of use
  • Security

Support

  • Help Center
  • API Docs
  • Schedule A Demo
  • Contact Us
  • Write For Us