I have an app, that consists of two parts 1. Backend, Java Spring Boot app 2. Electron/Angular front-end I wanna test backend and frontend together. It would be great to start JUnit cucumber test, call the spectron test from one of cucumber cases, and get result of spectron testing back to cucumber. Is it real to get some tests results from spectron "outside"?
Asked
Active
Viewed 269 times
1 Answers
0
I think you can do this like this :
Create BE and FE test projects in the same project,
Create one object that stores your responses datas from both BE and FE:
While tests are running, initialize this object and feed it with your results.
How to feed this object:
- For BE, if it is an API store responses as a JSON.
- For FE, collect datas from elements and store them as
String
or Json again.
Then assert every actions for BE and FE on the corresponding steps and validate them with comparing this JSON or String
datas.
-
big thank! I have done it in way similar to your advice,just get xml report from mocha and parse it in java BE. – Daniel Prosianikov Feb 13 '19 at 20:29
-
Your welcome. Would you mind to accept my answer please? @DanielProsianikov – sayhan Feb 13 '19 at 20:30