GithubHelp home page GithubHelp logo

ischonger / neodymium-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xceptance/neodymium-template

0.0 1.0 0.0 31 KB

A simple template for a test automation suite using Neodymium.

License: MIT License

Gherkin 4.55% Java 84.48% Batchfile 6.42% Shell 4.54%

neodymium-template's Introduction

Introduction

This repository is supposed to be used as template for test automation projects using Neodymium Library. It contains both a pure Java and a Cucumber approach as well. A test automation template based on best practice libraries and added missing functionalities to aid test automation done by Xceptance.

Getting familiar

Please perform the Hello World tutorial first to get a first insight and feeling for test automation with Neodymium. Afterwards you are ready to deep dive into more complex scenarios. Our Neodymium-example project demonstrates all the cool stuff that's possible with Neodymium. Furthermore, we set up a Neodymium Wiki to explain different concepts and use cases.

Hello World

Get your own copy

  1. Fork this project
  2. Rename the project (Open the pom.xml and adjust the name tag)
  3. Import the project into an IDE of your choice. (It should be able to handle Maven project in order to sort all the dependencies for you)

Set up

  1. Set up WebDrivers and Browsers
    1. Open config\browser.properties
    2. Set the property neodymium.webDriver.chrome.pathToDriverServer
    3. Set the property neodymium.webDriver.chrome.pathToBrowser if you want don't want to use the default Chrome
  2. Add the URL to start in template.settings.Settings.java (or try with https://www.xceptance.com/en/ (already set) for demo purposes)

Execution

  1. Run the template.neodymium.tests.smoke.HomePageTest.java from the Neodymium package as JUnit test

Validate the World with Neodymium

  1. Uncomment homepage.validateStructure(); within the HomePageTest.java
  2. Adjust the validation within the template.pageObjects.pages.HomePage.java to match the site that is going to be tested (only if you changed it)
  3. Run the template.neodymium.tests.smoke.HomePageTest.java again

Validate the World with Cucumber

  1. Run the template.cucumber.tests.RunAllTests.java from the Cucumber package as JUnit test

Taking ownership

If you want to adopt the template for your own project your certainly would like to change the template folder to something project specific. Please perform the following steps to rename it:

  1. Rename the template package to a name of your choice
  2. Update the pom.xml (especially the Surefire configuration that states which tests should be executed)
  3. Update the @CucumberOptions within template.cucumber.tests.RunAllTests.java to have the new path in features and glue

Remove unneeded code approach

After you have decided whether you want to go the pure Java or the Cucumber way. You can simply delete the folder of the unused approach (either src/test/java/template/neodymium or src/test/java/template/cucumber). If you like you can also clean up the Surefire configuration in the pom.xml by removing the now unused <include> path.

<includes>
    <!-- Neodymium (pure Java) test cases -->
    <include>template/neodymium/tests/**/*Test.java</include>
    <!-- Cucumber test cases -->
    <include>template/cucumber/tests/RunAllFeaturesTest.java</include>
</includes>

In case you want to use both approaches you are free to do so and take advantage of booth of their strengths.

License

MIT

neodymium-template's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.