Contact us
  • en
  • fr
  • Solutions
    • Company IntranetDiscover our company intranet software to connect and engage your employees
    • Collaboration PlatformDiscover our digital collaboration platform that boost your employee engagement and performance
    • Knowledge ManagementHow To build and manage your knowledge base with eXo Platform
    • Employee EngagementDiscover how to boost your employee engagement
  • Product
    • Overview
      • Software TourAn overview of our software capabilities
      • Why eXoHow eXo improves your employee experience
    • Features
      • CommunicationFeatures to facilitate employee communications
      • CollaborationFeatures to create efficient teams
      • KnowledgeKnowledge management capabilities
      • ProductivityEmployee productivity tools to engage employees
    • Technology
      • Open sourceAn overview of our technology
      • IntegrationsDiscover how eXo integrates with your tools and systems
      • SecurityHow eXo Platform ensures your data security
  • Pricing
    • Product pricingLearn about our business model and pricing
    • ServicesLearn about our professional services
    • FAQsQuestions about the software, the community and our offers
  • Resources
    • Resource center
      • Case studies
      • White Papers
      • Datasheets
      • Videos
    • Technical documentation
      • Getting started
      • Developer Guide
      • Technical administration guide
      • REST APIs
    • From The Blog
      • eXo Platform 6.4 is here, available in both Enterprise and Community editions!
      • eXo Platform community edition is back
      • Cloud Vs On-premise Digital Workplace: Which one is right for your business?
  • Company
    • About us
    • Careers
    • Customers
    • Newsroom
    • Contact us
    • Partners
  • Menu mobile
    • Pricing
    • About us
    • Services
    • FAQs
    • Customers
    • Resource center
    • Contact us
    • Blog
Company Intranet Discover our company intranet software to connect and engage your employees
Collaboration Platform Discover our digital collaboration platform that boost your employee engagement and performance
Knowledge Management How To build and manage your knowledge base with eXo Platform
Employee Engagement Discover how to boost your employee engagement
Overview
  • Software Tour An overview of our software capabilities
  • Why eXo How eXo improves your employee experience
Features
  • Communication Features to facilitate employee communications
  • Collaboration Features to create efficient teams
  • Knowledge Knowledge management capabilities
  • Productivity Employee productivity tools to engage employees
Technology
  • Open source An overview of our technology
  • Integrations Discover how eXo integrates with your tools and systems
  • Security How eXo Platform ensures your data security
Product pricing Learn about our business model and pricing
Services Learn about our professional services
FAQs Questions about the software, the community and our offers
Resource center
  • Case studies
  • White Papers
  • Datasheets
  • Videos
Technical documentation
  • Getting started
  • Developer Guide
  • Technical administration guide
  • REST APIs
From The Blog
  • eXo Platform 6.4 is here, available in both Enterprise and Community editions!
  • eXo Platform community edition is back
  • Cloud Vs On-premise Digital Workplace: Which one is right for your business?
About us
Careers
Customers
Newsroom
Contact us
Partners
Pricing
About us
Services
FAQs
Customers
Resource center
Contact us
Blog
  1. Accueil
  2. Tutorial
  3. How to Set Up Your Test Automation at eXo Platform

How to Set Up Your Test Automation at eXo Platform

1. What is an automated test ?

An automated test doesn’t require human intervention. Automated test execution requires computer solutions that perform actions, either in a web browser or at the operating system level.

Test automation can reduce testing efforts and increase the amount of testing performed in a limited time. Some tests can be done in minutes that would take several hours if they had been run manually.

  2. How do we automate tests in eXo ?

2.1 Development languages and tools

We need the following environment to develop and run test cases:

  • Maven 3
  • JDK 8
  • Docker

Our automation test tool framework is Selenide.

Why Selenide?

To choose the best tool, we selected criteria that we consider essential (see the table below).

SeleniumCodeceptionWindmillSahiCucumberSelenide
Open sourceyesyesyesyes with Pro versionyesyes
Cross-browseryesyesyesyesyesyes
Development languageJavaPHPPythonPHPPHPJava
Script languageJavaScript PHP Python

C#

Java

Ruby

PHPJavaScript Python

Ruby

JavaScriptGherkin

+

Java

JavaScript PHP Python

C#

Java

Regular updatehighhighlowlowmediumhigh
Record playbackyesyesyesyesnoyes
Intelligent identification of objectsnononoyesnono
Waiting for events (Ajax)yesyesnoyesnoyes
ReportingyesyesyesOnly Pro versionPluginyes

 

The criteria for choosing the best automation tool are the same for Selenium and Selenide. We chose Selenide because it offers simplicity in creating test cases, as explained in this link:  selenide vs selenium.

2.2 Automatic test development

The choice of test cases to be automated is based on several criteria, such as execution frequency, the development and maintenance time for the test case, and the test case execution time.

The diagram below shows the different criteria for selecting cases that will be automated.

Les différents critères pour un test automatiséTo automate a test case, we have to go through three steps.

1. Locator declaration

“Locators” are variables defined in the “Xlocators” classes to select the HTML elements used in the test cases.

We find these classes in the“Selenium” module.

Classes sous le module SeleniumHere are some examples of locators:

By “id”

public static final SelenideElement ELEMENT_ABOUT_ME_PORTLET=$(byId(“UIExperienceProfilePortlet“));

By “className”

public static final SelenideElement ELEMENT_BUTTON_ADD_GADGET=$(byClassName(“AddIcon“));

By “Xpath”

public static final SelenideElement ELEMENT_TAB_ACCESS_AND =  $(byXpath(“//*[@id=\”UITabPane\”]/ul/li[2]/a“));

There are several ways to define the locator. We should prioritize selection by “id” or “className” if it is unique. Also,  we can use by “Xpath”, “value”, “type”, “name”, and so on.

2. Function development

Functions are specific actions that will be used in test cases. All the functions used in our test cases are in the “pageobject” package of each module. For example, the functions used for wiki test cases are under the “pageobject” package in the wiki module.

Les fonctions utilisées pour les cas de tests wiki

We must use locators that have already been declared in our functions. Below you can see the “add a user” function used extensively in our test cases.

Locators déclarés dans un cas de test3. Test case development

Smoke test cases are under the module associated with these tests. For example, smoke forum tests are under the forum module.

Tests Smoke sous le module Forum

Sniff and functional test cases are under the platform module because they require dependencies to the other modules.

The test type is specified using the @Tag annotation in test classes. For example, this class contains sniff tests of the Answer function:

We use pre-defined functions in our test cases to execute the desired scenario.

3) How do we run automated tests?

3.1. Run with IDE and local browser

We can run the test case through the IDE (Intellij) by adding the necessary parameters in “VM_options(-ea -Dwebdriver.chrome.driver=<path-to-chrome-driver> -Dselenide.baseUrl=<exoplatform-instance-url>)”. The test will be run on your local browser.

3.2. Run with Maven and local browser

We can run tests using this Maven command:

mvn  clean verify -Prun-its,chrome \
-Dselenide.baseUrl=<exoplatform-instance-url> \

-Dselenium.webdriver.chrome.driver.path=<path-to-chrome-driver>

3.3. Run with Docker, Maven and Selenium Grid

Tests can be run on Docker images of Selenium Grid and Chrome.

First, we must start containers using this command:

docker-compose -f core/src/main/resources/stack/docker-compose-50-hsqldb.yml -p qa_ui up

Then, we run tests on the chrome node of the Selenium Grid.

We can use this parameter to select tests to run; for example, if you want to run smoke tests, you add -Dselenide.test.tags.include=smoke \ to the above command.

3.4. Run with Jenkins

We can also run automated tests through our private pipeline: platform-qa-ui-with-params.

Conclusion

Test automation at eXo has allowed increased coverage of test cases, early detection of anomalies (i.e. we have scheduled an automatic weekly Jenkins pipeline run for early bug detection) and time savings in execution (e.g. 1000 cases require 10 d/h to execute on one instance manually, while automatic tests are run in four hours on multiple instances in parallel).

 


Join The eXo Tribe

Join The eXo Tribe


Register for our Community to Get updates, tutorials, support, and access to the Platform and add-on downloads. Sign in Now!

Brahim Jaouane

I am a Digital Marketing specialist specialized in SEO at eXo Platform. Passionate about new technologies and Digital Marketing. With 10 years' experience, I support companies in their digital communication strategies and implement the tools necessary for their success. My approach combines the use of different traffic acquisition levers and an optimization of the user experience to convert visitors into customers. After various digital experiences in communication agencies as well as in B2B company, I have a wide range of skills and I am able to manage the digital marketing strategy of small and medium-sized companies.

Full-featured digital workplace with everything your employees need to work efficiently, smartly integrated for a compelling employee experience

  • Product
    • Software tour
    • Communication
    • Collaboration
    • Knowledge
    • Productivity
    • Open Source
    • Integrations
    • Security
  • Uses cases
    • Digital Workplace
    • Intranet software
    • Collaboration software
    • Knowledge management software
    • Entreprise Social Network
    • Employee Engagement platform
  • Roles
    • Internal Communications
    • Human Resources
    • Information Technology
  • Company
    • Product offer
    • Services Offer
    • Customers
    • Partners
    • About us
  • Resources
    • FAQs
    • Resource Center
    • Collaboration guide
    • What is a Digital workplace?
    • What is an intranet?
    • Employee engagement
  • Terms and Conditions
  • Legal
  • Privacy Policy
  • Accessibility
  • Contact us
  • Sitemap
  • Facebook
  • Twitter
  • LinkedIn
wpDiscuz