Skip to content

SEMOSS/e2e

Repository files navigation

AI Core Playwright Setup

AI Core

Make sure you have AI Core locally installed!

Run Codegen

Use codegen to help write tests.

mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen http://localhost:9090/semoss-ui/packages/client/dist/#/"

For testers using local SEMOSS setup

Remember to update environment to latest changes

git pull Monolith
git pull Semoss
git pull semoss-ui
pnpm install
pnpm run dev:client

For testers using docker setup

docker pull semoss/docker:latest

stop container

docker compose rm -f semoss

start container

docker compose up semoss

Testing Tickets - Contributor's Guide

If you have recently implemented a new functionality or page that will require e2e testing, you can help the testing team by either emailing them an outline of the relevant Features and Scenarios or creating the Epic and Task tickets yourself here in the e2e repo using the guidelines below.

Constructs & GitHub Setup

At a high level, each page in the AI Core platform is referred to a Feature and represented as an Epic ticket.

Within each page, each piece of functionality is referred to as a Scenario and is represented as a Task ticket. These Scenario Task tickets are the children/sub-issues of their associated Epic ticket.

Each scenario ticket then contains one test formatted usning the Given, When, Then template:

Given [the preconditions(s) or current state], When [event or user action], Then [expected outcome]

For example, the Epic ticket for the Member Settings page feature contains sub-issues for User List and Add Native Account. The User List scenario then tests the functionality that given a user is logged in as an admin, when they go to the Member Settings page, then they can properly use the pagination to view all users in the table.

Feel free to view the current Issues for more detailed examples!

Outline Example #41

[EPIC ISSUE] Feature: Member Settings page

[TASK SUB-ISSUE] Scenario 1: User List

  • Given: a user is logged in as admin
  • When: they go to the Member Settings page
  • Then: they can properly use the pagination

[TASK SUB-ISSUE] Scenario 2: Add Native Account

  • Given: ...
  • When: ...
  • Then: ...

Docker setup

  • Follow docker instructions found in here

Run Trace Viewer

  • To run Trace Viewer, please enable traces before running the test in config.properties or local.properties
  • After running tests with use_trace set to true. Find the zip of the test you ran in traces/features directory
  • Then from the e2e directory, run:

mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="show-trace '/path/to/zip.zip'"

  • a Chromium browser should open where you can view the webpage and click through playwright commands, and view network calls

Developer WIKI

About

E2E Testing Suite

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 16

Languages