Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEBUG End-End Testing #693

Open
2 of 5 tasks
MervinHernandez opened this issue Jun 15, 2024 · 23 comments · May be fixed by #810
Open
2 of 5 tasks

DEBUG End-End Testing #693

MervinHernandez opened this issue Jun 15, 2024 · 23 comments · May be fixed by #810
Assignees

Comments

@MervinHernandez
Copy link
Collaborator

MervinHernandez commented Jun 15, 2024

Nov 2024 - Testing Workflows Plan

  1. Grab the /develop branch of gatherpress repo
  2. Automate tests and deployment onto test.gatherpress.org

📌 Pinned Links
Miro - End to End Testing flow https://miro.com/app/board/uXjVLBv8dx4=/?share_link_id=487208467571


Deprecated Plan

Create new setup for end-end tests:

  • [Mervin] INSTALLED Latest plugin on develop.gatherpress.org
  • [Mervin] ?? UPDATE develop.gatherpress.org with fresh clone of PROD
  • DOCUMENT Scenarios to Automate
  • WRITE Fresh end-end test Scenarios Scripts (?Playwright)
  • DOCUMENT how to execute tests (?commit message / else?)
@MervinHernandez MervinHernandez converted this from a draft issue Jun 15, 2024
@MervinHernandez MervinHernandez self-assigned this Jun 15, 2024
@MervinHernandez
Copy link
Collaborator Author

🚩 NEW Ticket - DEBUG End-to-End Testing

✅ Drafted ticket
✅ Added Prashant to github project as a member
✅ Pinged Prashant for stepping into new ticket

DRAFT Checklist

  • [Mervin] INSTALLED Latest plugin on develop.gatherpress.org
  • [Mervin] ?? UPDATE develop.gatherpress.org with fresh clone of PROD
  • WRITE Fresh end-end tests (?Playwright)
  • DOCUMENT how to execute tests (?commit message / else?)

@MervinHernandez
Copy link
Collaborator Author

RE Scenarios

  1. Plugin Installation + Activation
  2. Publish an Event
  3. Respond to RSVP "Attending"

@prashantabellad
Copy link
Contributor

Hi @mauteri
we would like to know the user scenarios/test cases for test automation.

@mauteri
Copy link
Contributor

mauteri commented Jun 17, 2024

@MervinHernandez mind working with them on this? Thanks.

@MervinHernandez
Copy link
Collaborator Author

@prashantabellad leta begin with the checklist I outlined here, and expand these tests later.

@01Prayag
Copy link
Contributor

01Prayag commented Jun 18, 2024

Hi, @MervinHernandez @mauteri,
I analyzed the scenarios and noted down the steps to perform action and validate scenarios. Please let me know if it is good to start writing the automation tests.

Test Scenario Steps:

Plugin installation + activation.

  • Log in to [dev.gatherpress.org/wp-admin] (http://dev.gatherpress.org/wp-admin).

  • Click on Plugins, from the left side menu.

  • Click on Activate text below the plugin name, to activate the plugin.

    Validate:

  • Verify that the user is on plugin page. (verify the page url.)
  • Verify the Add New Plugin button.
  • Verify that the list of plugins is visible on the plugin menu page.

Publish an Event.

  • Log in to dev.gatherpress.org/wp-admin.

  • Click on Event, from the left side menu.

  • Click on the Add New Event button.

  • Add title to the event, select date and time, and select venue of event.

  • Click on publish button.

    Validate:

  • Verify that the user is on the event page.
  • Verify that the user can add new event to the application.
  • Verify that the added event is visible on the event page.

Respond to RSVP “Attending”.

  • Log in to dev.gatherpress.org
  • View the latest event.
  • Click on RSVP button.
  • Log in to the application.
  • View the attendance list.

Validate:

  • Verify that the user can view upcoming events on home page of gatherpress.org
  • Verify that the RSVP button is working well. (user logins to the selected event)
  • Verify that after successful login, the user should be added to the attendance list.
  • Verify that the user should select the attendance status. (not attending).

@MervinHernandez
Copy link
Collaborator Author

✅ Reviewed game plan drafted by QA team // made a few suggestions and cleared to proceed!

@prashantabellad
Copy link
Contributor

@MervinHernandez @mauteri we need to decide upon the test data clean-up strategy. There are 2 ways of doing it.
cc @01Prayag

  1. Delete through API before each test execution -->
    For example, here we would always create any entity of the same name across tests (say a new event by the name "GatherPress Event"). Before a test case is executing we will delete this entity created by the previous test (if present)

Issue: Here the issue is we had tried (few months back) to DELETE entities through Wordpress documented API however these transactions were not successful

  1. Clean up the test generated data through a scheduled job (weekly/monthly/quarterly)
    Here we would delete the data of the test user
    Each test case would create a unique event (eg Event1, Event2 etc) for the tests to be deterministic and to be independent of each other

@MervinHernandez
Copy link
Collaborator Author

Other concepts for this

  1. Use SpinUpWP API to execute a fresh "Clone of PROD" every week or so?
  2. Manually execute "Clone of PROD" via SpinUp Dashboard every week or so?
    Would either of these be a bad idea because we need to hang on to some code in dev.gatherpress.org ?

If my idea is a bad one, then my vote is for a schedule cron job @prashantabellad

@prashantabellad
Copy link
Contributor

@MervinHernandez I did not understand cloning from Prod every week.

@MervinHernandez
Copy link
Collaborator Author

Via SpinUpWP, we can execute creating a fresh image of "develop" from Production instance.
This would replace all files and db tho.

@MervinHernandez MervinHernandez moved this from Icebox to In Progress in GatherPress Project Jun 21, 2024
@MervinHernandez
Copy link
Collaborator Author

Hi @prashantabellad when able - can you share (or confirm) what the game plan is for rolling this out fresh?
Note: Just updated gatherpress plugin in develop to latest release 0.29.2.

?? Any actions for me?

@prashantabellad
Copy link
Contributor

Hi @MervinHernandez, I will update you with the plan by tomorrow June 24th

@prashantabellad
Copy link
Contributor

Hi @MervinHernandez below is the plan:

As part of the first PR we will build below test cases:

  1. The user should publish the online event.
  2. The user should publish the offline event.
  3. Verify that the logged- in user should view RSVP button on home page and perform RSVP action.
  4. Verify that the non logged- in user should view RSVP button on home page and perform RSVP action.

The plan is to complete the above by June 26th, Wed.

For the test data clean-up strategy, on Friday @mauteri suggested that we can use a dynamic environment (temporary one) which will build the app from the main branch code and execute the tests on the same. This environment would be created fresh for each testing.
@mauteri please correct/add as deemed fit
cc @01Prayag

@MervinHernandez
Copy link
Collaborator Author

Hi team - considering how-if we can use Playgrounds for testing purposes.
My initial guess is no, we cannot because this is a very temporary environment that may not fit the bill for persistent tests.

I need to understand more how we can funnel a certain branch to a playground, execute tests, and then log the results.

@MervinHernandez
Copy link
Collaborator Author

MervinHernandez commented Jul 13, 2024

🚩 UNABLE to Mount a Repo to Playgrounds

❌ Following testing, I was not easily able to mount a repo containing plugins and other code to a Playground.


Recommending we Stick with Known Git Workflows

Suggesting we discuss staying with known development site + github repo workflows, for testing and managing a develop instance.
See June 22 recommended approach.

graph TD
    A[GP Repo Feature Branch X] --> B[Merge Operation]
    B --> C[Deploy Bot]
    C -->|Automatic| D[⭐ PUSH Update to develop.gatherpress.org]
    D --> E[Automated tests executed]
Loading

@MervinHernandez
Copy link
Collaborator Author

🔔 NEXT Actions

  1. Mervin-Carsten meet to discuss how playground may be leveraged successfully for end-to-end testing
    • Scheduling for this call is in the works as of this writing.
  2. [if needed] Mervin-Mike discuss sticking to more familiar methods
  3. Implement the selected method + relay to QA and all team

@MervinHernandez
Copy link
Collaborator Author

Touched // Mervin-Carsten will try to talk now after the huddle // otherwise, we'll schedule a call.

@MervinHernandez
Copy link
Collaborator Author

Discussion - August 2


1 Carsten agreed = Playground would not fit the bill for end to end testing
2 Drafting new plan // mervin drew chicken scratch
3 Carsten to follow-up on the suggested approach
4 ✅ Scheduled Meeting - Aug 6 @ 4pm CT

@carstingaxion carstingaxion linked a pull request Aug 17, 2024 that will close this issue
5 tasks
@MervinHernandez
Copy link
Collaborator Author

Queued for discussion September 27

@MervinHernandez
Copy link
Collaborator Author

Updated the game plan - will share tomorrow during huddle.

@MervinHernandez
Copy link
Collaborator Author

WingManWP team - nearing a completion milestone on end-to-end testing implementation.
https://miro.com/app/board/uXjVLBv8dx4=/?share_link_id=487208467571

@MervinHernandez
Copy link
Collaborator Author

🏁 Completed - Re-Activating Test Environment and Workflow

This is now visible and hot on test.gatherpress.org

New ticket being written for updating automated tests #965

@MervinHernandez MervinHernandez moved this from In Progress to Done in GatherPress Project Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

4 participants