This is a demo project intended to show how Test as a Product and the Bridge Service can work. In this project we show how testBridge works.
We have the following parts:
- my-blog : A ReactJS project.
- my-blog-backend : A nodeJS-based micro-service.
- e2e-tests/backend-tests : A Java Project dedicated to testing the my-blog-backend apis.
- e2e-tests/frontend-tests/fe-tests-cypress : A cypress project dedicated to testing the front-end.
In this chapter we help you start the demo project.
For the project to work you need the following:
- Git access
- Java >= 11
- Node >= 16
- Maven and access to an artefactory
This project has been tested with the node versions:
v20.7.0
v18.16.1
v16.17.0
(Better avoid)
and Java versions:
- Java 18
- Java 11
- Java 8 (Will work just to get the project working. But to finish the demo you will need at least Java 11)
There is a rough deployment order to get this project running:
- Start the Back End
- Testing the Back End
- Start the my-blog app
- Testing the front end
To start the backend :
- Go to the directory
my-blog-backend
. - Install the dependencies
npm i
- Press
npm run dev
Now you can test the system by running backend tests.
To run the backend tests:
- go to project
e2e-tests/backend-tests/
- Run tests by entering
mvn clean test
To start the front-end application:
- Go to the directory
my-blog
. - Install the dependencies
npm i
- Press
npm run start
Now you can test the system by running backend tests. But you can see that it is running with the url http://localhost:3000/.
In order to start the cypress tests:
- go to project
e2e-tests/frontend-tests/fe-tests-cypress
- Install the dependencies
npm i
npm run cy:run
. Other simply open cypress for manually assited runningnpx cypress open
.
As this section is a Cypress project, we need to install the necessary dependencies Cypress Dependencies.
While running the project on CodeSpace you will encounter issues related to Xvfb.
Your system is missing the dependency: Xvfb
Install Xvfb and run Cypress again.
In such cases you can simply install it by running the following from the CodeSpaces terminal:
sudo apt update
sudo apt install xvfb