2. What is Selenium?
Automates browser
Testing feature
(element assertion, etc)
Selenium IDE
supported on Firefox
Other browsers are
supported for testing
3. UI Testing
Logic testing doesn’t cover UI
Web application’s UI is browsers
It’s not easy to testing with browsers
4. With Selenium
Testable with Browsers
Test cases can be written in:
Java, C#, Ruby, Python, etc
Using CI,
UI becomes testable continuously
5. Architecture
Selenium 2.0
WebDriver
A driver, which is run by a Client
Driver
Client Driver
Test drivers, implemented in some
languages (Java, C#, Python, etc)
6. Architecture
Drive a browser directly from a client
Browser
Client Driver Selenium IDE
( library )
WebDriver
plugin
7. Architecture
Drive a browser from Selenium Server
Selenium
Server
( java daemon ) Browser
Remote Selenium IDE
WebDriver
WebDriver
plugin
Client Driver
( library )
12. Be Careful
If recording mode on:
All actions recorded automatically
May be an accident,
if the mode is on by mistake
Otherwise:
No actions recorded automatically
13. Let’s Record
To record, turn on the recording mode
You only do browsing,
same as when you browse normally
15. To JUnit Test Case
It’s easy to convert to JUnit Test Case,
or other formats.
Enable the feature,
[Options]-[Options]-
[Enable experimental features]
To convert,
[Options]-[Format]-
[What a format you want]
17. Other Ways
Copy directly to clipboard:
[Options]-[Clipboard Format]-
[What a format you want]
Export as a file:
[File]-[Export Test Case As...]-
[What a format you want]
18. Architecture Comparison
Browser
Selenium IDE
Client Driver
( library )
WebDriver
plugin
It takes about a minute to run test
As I investigated,
class loading is a little slow
19. Architecture Comparison
Selenium
Server
( java daemon )
Browser
Remote Selenium IDE
WebDriver
WebDriver
plugin
Client Driver
( library )
Required that the server is ready
It takes rather a half time than without
the server
20. Conclusion
UI testing is complex,
so the maintenance is not easy
Suggest that test the critical patterns
Login/Logout, and any other
very important features
Powerful to prevent the regression