|By Andreas Grabner||
|June 17, 2010 02:27 PM EDT||
With more than 3 million downloads, Selenium is a functional testing framework. It allows web developers and QA professionals to automatically test how an application functions on multiple browsers, such as Firefox, Internet Explorer and Chrome and across operating systems, such as different versions of Windows and Mac OS.
The FREE dynaTrace AJAX Edition on the other side is probably the best web site performance analysis tool for Internet Explorer 6, 7 and 8. Here is what John Resig, Creator of jQuery has to say about it: “I’m very impressed with dynaTrace AJAX Edition’s ability to get at the underlying “magic” that happens inside a browser: page rendering, DOM method execution, browser events, and page layout calculation. Much of this information is completely hidden from developers and I’ve never seen it so easily collected into a single tool. Huge kudos to dynaTrace for revealing this information and especially so for making it happen in Internet Explorer”
Combine best of breed tools for Automated Performance Analysis
If we look at these two tools it almost seems logical to use them in combination in order to automatically capture performance data from within the browser for every Selenium Test you execute.
Why would you want to do that?
In case your Selenium Tests identify a problem – whether it is a functional issue (page not working correctly) or a performance problem (page are much slower in the latest build) – the data that is automatically captured by dynaTrace AJAX contains all information necessary for your web engineers to figure out the root cause of the problem. Without this information, your engineers probably go ahead and manually reproduce the error by executing and debugging through the test case manually. Manual work means additional time and effort – and that’s what can be avoided. Best of all – BOTH TOOLS ARE FREE!!
How it works – Example on testing Google Search
Selenium has multiple options to execute tests. Either use your HTML Test Suites that define the individual test cases in HTML Tables or use a programming language such as Java and “code” your tests. Let’s have a look at these two scenarios and how you can get Selenium to work with the dynaTrace AJAX Edition.
The integration basics are explained in Automation with dynaTrace AJAX Edition and in Advanced Timing and Argument Capturing. The dynaTrace AJAX Agent that runs as an Internet Explorer Add-On gets activated and is configurable via several environment variables. DT_IE_AGENT_ACTIVE=true activates the Add-On so that it collects data from the current browser session. DT_IE_SESSION_NAME can be used to specify the recorded session name, e.g.: MySeleniumTest123. DT_IE_SERVER_HOST and DT_IE_SERVER_PORT can be used to connect to a dynaTrace AJAX Edition client that runs on a different machine – this is useful when you want to centralize data capturing. DT_IE_CLEAR_CACHE=true causes the Add-On to clear the browser cache before any actions are executed – this is very useful when you want to test your web sites cache behaviour.
These environment variables need to be set for the browser instance that runs the tested website. The browser is launched by the selenium server process. Therefore we have to set these environment variables for that server process as they are propagated to all processes that get launched from it.
Requirement: The dynaTrace AJAX Edition must be running on the local machine in order for the launched browser instances to connect to it. You can also run the AJAX Edition on a different machine – in this case you need to specify DT_IE_SERVER_NAME with the name of the machine where the AJAX Edition runs on.
Running an HTML Test Suite
The following batch file sets the necessary environment variables to a) activate the dynaTrace AJAX Add-On in IE and b) specifiy a custom session name:
rem dynaTrace AJAX IE agent settings
java -jar %SELENIUM_RC% -log exec.log -htmlSuite "*iexplore" "http://www.google.com"
Before I run this script I make sure to launch the dynaTrace AJAX Edition. When I execute the script Selenium will launch the HtmlRunner in a separate browser instance and will then launch the browser that will execute your test steps. The second browser instance will have the active dynaTrace AJAX agent. You can tell this by the changed IE icon as well as an increasing number in the Captured Events displayed in the dynaTrace AJAX Edition IE Toolbar:
Note: Even though both browser instances use the DT_IE_XXX environment variables, the AJAX Edition will not collect information from the Selenium Test Runner. The Test Runner runs as an HTA Application which prevents the AJAX Edition Add-On from being loaded. In this case it is an advantage as we are not interested in the performance of the Selenium Runner.
Once the test is done and the browser is closed we can explore the results captured in the dynaTrace AJAX Edition:
The session name is the one we passed in via DT_IE_SESSION_NAME – Google_SeleniumTest in this case. You will see a URL to a local file. That is a file that Selenium opens which then actually opens the URL of the test application. Simply ignore this line and focus on those URLs of your test scenario.
Running Test Case from Java (or JUnit)
Many folks out there use the option to write their Selenium tests in Java – either using JUnit as executing framework or just using the DefaultSelenium proxy in a console app or custom test framework. The approach here is the same as explained in the Html Test Case Use Case. We have to start the selenium server with the DT_IE_XXX environment variables. Here is the batch file I use:
rem IE agent settings
java -jar %SELENIUM_RC%
Here is my Java application that executes the same Google Search test steps as my HTML Test Suite:
Selenium selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://www.google.com");
The result is the same. The Selenium server launches two browser instances. The first loads the Selenium Runner which won’t be analyzed by dynaTrace AJAX as it is an HTA Application. The second launches google.com and searches for dynaTrace. The following screenshot shows this captured session with the name dynaTrace_Selenium:
Where to go from here?
In case you have questions on this topic, either comment on the blog or use the comment feature on our dynaTrace AJAX Community Portal.
- 5 Steps to Automate Browser Performance Analysis with Watir and dynaTrace AJAX Edition I’ve recently been working with several clients to analyze their...
- Ensuring Web Site Performance – Why, What and How to Measure Automated and Accurately It is a fact that end user response time is...
- Selenium/BrowserMob integration with dynaTrace Selenium is a free Web Application Testing System. It gained...
- Automated Performance Analysis: What’s going on in my ASP.NET or ASP.NET MVC Application? I’ve spent some time in the last weeks playing with different...
- Week 6 – How to Make Developers Write Performance Tests I had an interesting conversation with our Test Automation team...
Just over a week ago I received a long and loud sustained applause for a presentation I delivered at this year’s Cloud Expo in Santa Clara. I was extremely pleased with the turnout and had some very good conversations with many of the attendees. Over the next few days I had many more meaningful conversations and was not only happy with the results but also learned a few new things. Here is everything I learned in those three days distilled into three short points.
Sep. 30, 2016 11:45 PM EDT Reads: 5,438
In this strange new world where more and more power is drawn from business technology, companies are effectively straddling two paths on the road to innovation and transformation into digital enterprises. The first path is the heritage trail – with “legacy” technology forming the background. Here, extant technologies are transformed by core IT teams to provide more API-driven approaches. Legacy systems can restrict companies that are transitioning into digital enterprises. To truly become a lea...
Sep. 30, 2016 11:30 PM EDT Reads: 757
Why do your mobile transformations need to happen today? Mobile is the strategy that enterprise transformation centers on to drive customer engagement. In his general session at @ThingsExpo, Roger Woods, Director, Mobile Product & Strategy – Adobe Marketing Cloud, covered key IoT and mobile trends that are forcing mobile transformation, key components of a solid mobile strategy and explored how brands are effectively driving mobile change throughout the enterprise.
Sep. 30, 2016 11:30 PM EDT Reads: 482
SYS-CON Events announced today that Roundee / LinearHub will exhibit at the WebRTC Summit at @ThingsExpo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. LinearHub provides Roundee Service, a smart platform for enterprise video conferencing with enhanced features such as automatic recording and transcription service. Slack users can integrate Roundee to their team via Slack’s App Directory, and '/roundee' command lets your video conference ...
Sep. 30, 2016 10:45 PM EDT Reads: 1,535
24Notion is full-service global creative digital marketing, technology and lifestyle agency that combines strategic ideas with customized tactical execution. With a broad understand of the art of traditional marketing, new media, communications and social influence, 24Notion uniquely understands how to connect your brand strategy with the right consumer. 24Notion ranked #12 on Corporate Social Responsibility - Book of List.
Sep. 30, 2016 10:45 PM EDT Reads: 504
Web Real-Time Communication APIs have quickly revolutionized what browsers are capable of. In addition to video and audio streams, we can now bi-directionally send arbitrary data over WebRTC's PeerConnection Data Channels. With the advent of Progressive Web Apps and new hardware APIs such as WebBluetooh and WebUSB, we can finally enable users to stitch together the Internet of Things directly from their browsers while communicating privately and securely in a decentralized way.
Sep. 30, 2016 10:00 PM EDT Reads: 1,259
"My role is working with customers, helping them go through this digital transformation. I spend a lot of time talking to banks, big industries, manufacturers working through how they are integrating and transforming their IT platforms and moving them forward," explained William Morrish, General Manager Product Sales at Interoute, in this SYS-CON.tv interview at 18th Cloud Expo, held June 7-9, 2016, at the Javits Center in New York City, NY.
Sep. 30, 2016 09:30 PM EDT Reads: 4,120
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, wh...
Sep. 30, 2016 09:00 PM EDT Reads: 4,059
Adobe is changing the world though digital experiences. Adobe helps customers develop and deliver high-impact experiences that differentiate brands, build loyalty, and drive revenue across every screen, including smartphones, computers, tablets and TVs. Adobe content solutions are used daily by millions of companies worldwide-from publishers and broadcasters, to enterprises, marketing agencies and household-name brands. Building on its established design leadership, Adobe enables customers not o...
Sep. 30, 2016 08:45 PM EDT Reads: 495
What are the new priorities for the connected business? First: businesses need to think differently about the types of connections they will need to make – these span well beyond the traditional app to app into more modern forms of integration including SaaS integrations, mobile integrations, APIs, device integration and Big Data integration. It’s important these are unified together vs. doing them all piecemeal. Second, these types of connections need to be simple to design, adapt and configure...
Sep. 30, 2016 07:30 PM EDT Reads: 570
What happens when the different parts of a vehicle become smarter than the vehicle itself? As we move toward the era of smart everything, hundreds of entities in a vehicle that communicate with each other, the vehicle and external systems create a need for identity orchestration so that all entities work as a conglomerate. Much like an orchestra without a conductor, without the ability to secure, control, and connect the link between a vehicle’s head unit, devices, and systems and to manage the ...
Sep. 30, 2016 07:15 PM EDT Reads: 487
The Jevons Paradox suggests that when technological advances increase efficiency of a resource, it results in an overall increase in consumption. Writing on the increased use of coal as a result of technological improvements, 19th-century economist William Stanley Jevons found that these improvements led to the development of new ways to utilize coal. In his session at 19th Cloud Expo, Mark Thiele, Chief Strategy Officer for Apcera, will compare the Jevons Paradox to modern-day enterprise IT, e...
Sep. 30, 2016 07:00 PM EDT Reads: 2,459
Major trends and emerging technologies – from virtual reality and IoT, to Big Data and algorithms – are helping organizations innovate in the digital era. However, to create real business value, IT must think beyond the ‘what’ of digital transformation to the ‘how’ to harness emerging trends, innovation and disruption. Architecture is the key that underpins and ties all these efforts together. In the digital age, it’s important to invest in architecture, extend the enterprise footprint to the cl...
Sep. 30, 2016 06:45 PM EDT Reads: 749
SYS-CON Events announced today that Commvault, a global leader in enterprise data protection and information management, has been named “Bronze Sponsor” of SYS-CON's 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Commvault is a leading provider of data protection and information management solutions, helping companies worldwide activate their data to drive more value and business insight and to transform moder...
Sep. 30, 2016 06:30 PM EDT Reads: 2,916
SYS-CON Events has announced today that Roger Strukhoff has been named conference chair of Cloud Expo and @ThingsExpo 2016 Silicon Valley. The 19th Cloud Expo and 6th @ThingsExpo will take place on November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. "The Internet of Things brings trillions of dollars of opportunity to developers and enterprise IT, no matter how you measure it," stated Roger Strukhoff. "More importantly, it leverages the power of devices and the Interne...
Sep. 30, 2016 06:15 PM EDT Reads: 3,550
What does it look like when you have access to cloud infrastructure and platform under the same roof? Let’s talk about the different layers of Technology as a Service: who cares, what runs where, and how does it all fit together. In his session at 18th Cloud Expo, Phil Jackson, Lead Technology Evangelist at SoftLayer, an IBM company, spoke about the picture being painted by IBM Cloud and how the tools being crafted can help fill the gaps in your IT infrastructure.
Sep. 30, 2016 06:15 PM EDT Reads: 3,174
Digital innovation is the next big wave of business transformation based on digital technologies of which IoT and Big Data are key components, For example: Business boundary innovation is a challenge to excavate third-party business value using IoT and BigData, like Nest Business structure innovation may propose re-building business structure from scratch, as Uber does in the taxicab industry The social model innovation is also a big challenge to the new social architecture with the design fr...
Sep. 30, 2016 05:45 PM EDT Reads: 1,385
Data is an unusual currency; it is not restricted by the same transactional limitations as money or people. In fact, the more that you leverage your data across multiple business use cases, the more valuable it becomes to the organization. And the same can be said about the organization’s analytics. In his session at 19th Cloud Expo, Bill Schmarzo, CTO for the Big Data Practice at EMC, will introduce a methodology for capturing, enriching and sharing data (and analytics) across the organizati...
Sep. 30, 2016 04:30 PM EDT Reads: 1,841
DevOps at Cloud Expo, taking place Nov 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 19th Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait for long dev...
Sep. 30, 2016 04:00 PM EDT Reads: 3,598
IoT offers a value of almost $4 trillion to the manufacturing industry through platforms that can improve margins, optimize operations & drive high performance work teams. By using IoT technologies as a foundation, manufacturing customers are integrating worker safety with manufacturing systems, driving deep collaboration and utilizing analytics to exponentially increased per-unit margins. However, as Benoit Lheureux, the VP for Research at Gartner points out, “IoT project implementers often ...
Sep. 30, 2016 03:45 PM EDT Reads: 3,674