Skip to content

A minimalistic Selenium WebDriver Starter Kit with PageObjects support in Java

License

Notifications You must be signed in to change notification settings

dzharii/Swd.StarterJ

Repository files navigation

SWD.Starter

SWD Page Recorder -= SWD Starter Java =- SWD Starter C#

🍎 Installation Prerequisites

In order to download and start using the project you have to install:

🔻 Download SWD Page Recorder

Logo

Doxygen documentation generator

Just run SWD.StarterJ\doxygen_run.cmd and enjoy your framework API documentation!

See generated SWD.StarterJ\docs\api\html\index.html

Logo

Core concepts:

  1. 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.

  2. 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.

  3. Start using PageObjects – or your code will turn to real crap soon.

  4. 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.

  5. 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.
  6. 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();
  1. Be proud of your code

📚 Useful Materials

📘 Test Automation Framework methodology

⚠️ read this only if you understand Russian... Otherwise... you will not understand anything. LOL: Заметки по архитектуре и методологии фреймворка

⚓ External Articles in English:

⚓ External Articles in Russian:

📹 Videos

:octocat: Original Github open-source Projects

🔎 About Dmytro ;)

About

A minimalistic Selenium WebDriver Starter Kit with PageObjects support in Java

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published