TEAMMATES / teammates

This is the project website for the TEAMMATES feedback management tool for education
https://teammatesv4.appspot.com/
GNU General Public License v2.0
1.67k stars 3.3k forks source link

Help Request: E2E test issues #11457

Closed xinyee20 closed 3 years ago

xinyee20 commented 3 years ago

What I was trying to do / What I need help with

I refactored some components in PR #11423 to address #11392. Some of the e2e tests failed after the refactoring. I tried downloading the chromedriver to run the e2e test locally on chrome, I realise that the number of test cases that failed does not tally and some that failed is different from the tests that failed in github (e2eTest(Firefox)). Quite a few of the test cases that failed when run locally does not seem related to the code that I have touched to refactor the components within so I am not sure what to touch and whether I should touch the pageObjects relevant to those test classes. Anyone with similar experience dealing with such e2eTests problems after changing some UI files knows how to handle such problems / has any advice?

Below are some of the test failures from the results of the e2eTesting:

Test class: teammates.e2e.cases.InstructorHomePageE2ETest.baseClassSetUp(): image

testAll Test class: teammates.e2e.cases.AdminHomePageE2ETest image

testRgqView Test class: teammates.e2e.cases.InstructorFeedbackReportPageE2ETest image

wkurniawan07 commented 3 years ago

In general, E2E test failures can come from few different sources; some intermittent, some quite permanent. The permanent ones are the ones that we're interested to resolve.

xinyee20 commented 3 years ago

Thanks for the advice! I ran the lastest master branch locally it couldn't pass all the e2eTests so i think the problem is partially due to my set up/environment problem so I am referring to the github tests errors to debug. I did tracing and found some component refactoring issues that I manage to fix and reduce the number of test failures. I am left with 3 test failures relating to comparison failures shown below but I can't seem to find the root problem despite attempting to trace the code a few times. Any advice on what could be causing this type of failures/how I can debug these kind of cases?

image

xinyee20 commented 3 years ago

Hi I realise that while updating my code, http://localhost:4200 gets updated but http://localhost:8080 is behaving very weirdly, not really updating properly and localhost:8080 is where the e2e tests are carried out. I am not sure what is going on, any ideas on how to get localhost:8080 to update properly? I tried switching to the main branch and ran the servers again but the backend server running was not reverted back to a version where no changes were made.

wkurniawan07 commented 3 years ago

The former is Angular dev server, the latter is backend server. If you wish the backend server to serve the built front-end files, you can refer to one of the items in the development guideline.

xinyee20 commented 3 years ago

Ah yes, running 'npm run build' solves the server update issue, thank you