Awesome
SWD.Starter
← SWD Starter Java -= SWD Starter C# =- SWD Page Recorder →
:apple: Installation Prerequisites
In order to download and start using the project you have to install:
- Git
- Visual Studio Community 2013 (RECOMENDED)
- _ _ _ OR Visual Studio 2013 Express Desktop (if you don’t have a professional one)
I personally recommend to use Chocolatey in order to perform such boring operations – automatically.
:small_red_triangle_down: Download SWD Page Recorder
Inaccurate instructions
1. Run Page Recorder
2. Open SWD.Starter / src / SWD.StarterKit.sln
2.1 Copy
* chromedriver.exe
* IEDriverServer.exe
into folder webdrivers
2.2 Build the project
3. Record your PageObject with Page Recorder
4. Generate code with template "[CSharp] SWD Starter PageObjects"
5. Follow the instructions inside generated code
5.1 Implement Invoke() and IsDisplayed();
6. Run the tests (set browser in the file "Config.config")
swdBrowserType
default is Firefox
Doxygen documentation generator
Just don’t forget to run SWD.Starter\doxygen_run.cmd
and enjoy your framework API documentation!
See generated SWD.Starter\docs\api\html\index.html
Core concepts:
-
Share the opened browser instance across different test cases – because that is how the most users do, e.g. they do not close the browser after each action.
-
If you really want parallel test execution, just run parallel processes… Multithreaded tests implementation inside a single process would add complexity to the code and kill your workstation performance.
-
Start using PageObjects – or your code will turn to real crap soon.
-
Are your 3000 UI tests took too much time? – You are doing something wrong when you want to test everything through UI. Consider 20 high level (UI) to 80 low level (HTTP Requests / Database / Unit) tests ratio.
-
Decouple your code: avoid copy-paste approach as long as it is reasonable:
- When the duplicated code in unique only for the given suite – create a separate method inside the suite
- When the duplicated code can be used globally across the project – move it to a special BusinessSteps class or to the specific page object class;
- when you code just extends WebDriver functionality and has no connection to your test project logic – move it to the framework core assembly.
-
When you work with PageObject, it is OK to create a lot of small methods with business logic oriented names. E.g., if you have the code, which opens a new project form:
btnNewProject.Click();
WaitForAjax();
Then just move it to a separate PageObject method:
var newProjectForm = projectsPage.OpenNewProjectForm();
- Be proud of your code
:books: Useful Materials
:blue_book: Test Automation Framework methodology
:warning: read this only if you understand Russian... Otherwise... you will not understand anything. LOL: Заметки по архитектуре и методологии фреймворка
:anchor: External Articles in English:
- SWD Page Recorder – records WebElements and generates PageObject classes (Announcement)
- PageObject Generator Utility for Selenium WebDriver
:anchor: External Articles in Russian:
- Материалы моего доклада (SWD Page Recorder) на #SeleniumCamp 2014 и ещё несколько фактов
- SWD Page Recorder: Записывает PageObject-классы для Selenium WebDriver
- SWD.Starter: Быстрый старт автоматизации тестирования UI на C# + Selenium WebDriver + PageObjects
:video_camera: Videos
- (English)SWD Page Recorder: Working with Frames and JavaScript popups
- (Rus) SWD Page Recorder – record your Page Objects fast like a ninja! (Dmytro Zharii)
- (Rus) SWD Page Recorder BETA1 -- записывает PageObject'ы на C#, Java, Ruby, Perl, Python!
- За пределами PageObject
:octocat: Original Github open-source Projects
:mag_right: About Dmytro ;)
- Blog (Rus): http://blog.zhariy.com/
- LinkedIn: https://www.linkedin.com/in/dmytrozharii
- Personal Email: dmytro.zharii !@[@]@! gmail.com
- :bird: Twitter: @dzhariy