Skip to content

dzharii/SWD.Starter

Repository files navigation

SWD.Starter

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

🍎 Installation Prerequisites

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

I personally recommend to use Chocolatey in order to perform such boring operations – automatically.

🔻 Download SWD Page Recorder

Logo

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

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

Use this Selenium WebDriver framework starter kit with SWD Page Recorder. See -->

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published