-
Notifications
You must be signed in to change notification settings - Fork 127
Test_Getting started with UI Autotest
William French edited this page Aug 7, 2014
·
1 revision
This document shows you how to use Selenium WebDriver to run tests that emulate user actions within the browser. You can run tests locally, or remotely by using WebDriver Grid.
- WebDriver as application driver
- Mstest to run tests.
- Visual Studio 2012 (or latest).
- Firefox (native WebDriver support)
- Safari (Mac only, native WebDriver support)
- Chrome (Chromedriver required)
- Internet Explorer (InternetExplorerDriver required)
How to run UI tests on your local computer
- Get the source code from github (fork https://github.com/alterm4nn/ChronoZoom). For more information see Clone the ChronoZoom GitHub Repository.
- Open Source\Chronozoom.sln
- Build the Source\Chronozoom.Entities\Chronozoom.Entities.csproj project.
- Open Test\chronozoom20.test\ChronoZoom.Testing.sln.
- Build the solution (All required packages will be installed).
- Configure tests settings: a. Open a file **Test\chronozoom20.test\Tests.UI\config.xml b. Set BaseUrl(http://test.chronozoomproject.org) c. BrowserName("chrome", "firefox" or "internet explorer")
- Add rules for chromedriver and iedriver in Windows Firewall:
- Open Windows Firewall.
- Click Advanced settings.
- Click Inbound Rules, then click New Rule....
- Click Programs, then click Next
- Create a new rule for chromedriver using the following program path:
Test\chronozoom20.test\ThirdParty\chromedriver.exe
- Complete the remaining wizard steps (accept default values).
- Repeat steps 2-6 to create a new rule for iedriver, using the following program path:
Test\chronozoom20.test\ThirdParty\IEDriverServer.exe
- Configure setting for AuthorizationTests:
- Open file
Test\chronozoom20.test\Application.Helper\Constants\Accounts.xml
- Set Login and Password for Google, Yahoo and Microsoft accounts. Please, Don't use your own accounts. You can create separate accounts for testing.
- Save Accounts.xml.
- Don't commit these changes to github. Add the file to git unstage:
git update-index --assume-unchanged **Test\chronozoom20.test\Application.Helper\Constants\Accounts.xml
- Open file
- Open Test Explorer and run UI tests (tests are located within the Tests.UI project.).
- Run a test.
- Browser will be started.
- Homepage will be opened.
- Test will do something.
- Browser will be closed.
- Test results will be shown.