Try now Demo en
  • en
  • fr
  • de
  • Solutions
    • Use cases
      • Modern IntranetBuild strong internal culture & sense of belonging
      • Collaboration PlatformEfficient teamwork and project collaboration
      • Social NetworkEngage users & recognize contributions
      • Knowledge hubCentralize, organize and share company knowledge
      • Application PortalUnified access to business applications and information
    • Switch to eXo
      • Microsoft 365 AlternativeAn open-source digital workplace alternative to M365
      • Migrate to eXo PlatformA guided, secure migration path from your existing tools to eXo
  • Product
    • Overview
      • Platform overviewExplore core capabilities
      • Why eXoKey differentiators
      • InternationalisationMultilingual environments
      • MobileBranded mobile applications
    • Platform
      • No CodeTailor to your needs without code
      • IntegrationsConnectors & extension capabilities
      • Controlled AIGoverned, extensible AI
    • Technology
      • ArchitectureArchitecture & technology
      • SecuritySecurity measures
      • Open sourceComponents & licensing
  • Offers
    • EnterprisePrivate cloud or on-premise deployments
    • eXo HubsReady-to-use SaaS edition for teams
    • Compare EditionsCompare editions and choose the right fit
    • OEM EditionFor software vendors & service providers
    • ServicesDiscover eXo professional services
  • Resources
    • Resource center
      • Case studies
      • White Papers
      • Datasheets
      • Videos
    • FAQsAbout the software, the community and our offers
      • Platform & Use Cases
      • AI & Responsible AI
      • Deployment, Security & Compliance
      • Open-source, Pricing & Services
    • From The Blog
      • eXo Platform 7.1 is released
      • Digital sovereignty: when public organizations move from words to action
      • Cloud Vs On-premise Digital Workplace: Which one is right for your business?
  • Community
    • CommunityJoin our online community platform
    • DownloadLaunch eXo platform in your infrastructure
    • Source codeSource code on github
    • REST APIs & DocumentationAll REST APIs available in eXo Platform
  • Company
    • About us
    • Customers
    • Partners
    • Contact us
    • Newsroom
  • Menu mobile
    • Enterprise Offers
    • Blog
    • About us
    • Resource center
    • Careers
    • Contact us
    • Try eXo
Use cases
  • Modern Intranet Build strong internal culture & sense of belonging
  • Collaboration Platform Efficient teamwork and project collaboration
  • Social Network Engage users & recognize contributions
  • Knowledge hub Centralize, organize and share company knowledge
  • Application Portal Unified access to business applications and information
Switch to eXo
  • Microsoft 365 Alternative An open-source digital workplace alternative to M365
  • Migrate to eXo Platform A guided, secure migration path from your existing tools to eXo
Overview
  • Platform overview Explore core capabilities
  • Why eXo Key differentiators
  • Internationalisation Multilingual environments
  • Mobile Branded mobile applications
Platform
  • No Code Tailor to your needs without code
  • Integrations Connectors & extension capabilities
  • Controlled AI Governed, extensible AI
Technology
  • Architecture Architecture & technology
  • Security Security measures
  • Open source Components & licensing
Enterprise Private cloud or on-premise deployments
eXo Hubs Ready-to-use SaaS edition for teams
Compare Editions Compare editions and choose the right fit
OEM Edition For software vendors & service providers
Services Discover eXo professional services
Resource center
  • Case studies
  • White Papers
  • Datasheets
  • Videos
FAQs About the software, the community and our offers
  • Platform & Use Cases
  • AI & Responsible AI
  • Deployment, Security & Compliance
  • Open-source, Pricing & Services
From The Blog
  • eXo Platform 7.1 is released
  • Digital sovereignty: when public organizations move from words to action
  • Cloud Vs On-premise Digital Workplace: Which one is right for your business?
Community Join our online community platform
Download Launch eXo platform in your infrastructure
Source code Source code on github
REST APIs & Documentation All REST APIs available in eXo Platform
About us
Customers
Partners
Contact us
Newsroom
Enterprise Offers
Blog
About us
Resource center
Careers
Contact us
Try eXo
  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
    • Internationalisation
    • Mobile
    • No Code
    • Architecture
    • Integrations
    • Security
    • Open Source
  • Uses cases
    • Employee Portal
    • Knowledge management
    • Entreprise Social Network
    • Employee Engagement
    • Community Management
    • Extranet
  • Guides
    • What is a digital workplace?
    • Intranet guide
    • What is an extranet?
    • Employee engagement
    • Collaboration guide
    • Teamwork guide
    • Internal Communication guide
  • Enterprise
    • Product offer
    • Services Offer
    • Customers
    • About us
  • Resources
    • FAQs
    • Resource Center
    • Intranet Portal
    • What Is a Collaboration Software?
    • Talent Management
    • Employee Connection
    • Employee Intranet
    • Improve internal communication
    • eXo Tribe
  • Terms and Conditions
  • Legal
  • Privacy Policy
  • Accessibility
  • Contact us
  • Sitemap
  • Facebook
  • Twitter
  • LinkedIn
wpDiscuz