-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Automated smoke test that mimics user behavior UI and CLI #4393
Comments
Hi @alexmt, @jessesuen , I could start on the initial automated UI tests using selenium-webdriver. This item could be divided into a couple of child items IMHO. Please assign this to me for now. |
I can take on the CLI testing part. @jessesuen please let me know if there will be a separate task for CLI testing. |
Ops, missed your message @keithchong . Please go ahead. @dewan-ahmed is it ok to use this ticket to track CLI and UI testing, and coordinate in comments? I can create separate ticket otherwise . |
Hi @alexmt that's fine; I'll use this same issue to ask questions and track the work. |
These are the steps I'm planning for CLI testing part: Pseudo script for
@alexmt please advise. |
@alexmt is the assumption that argocd is already installed and the user/session is connected to a K8s cluster? Or do we need to install the req'd dependency within the script? |
This is the verification I'm thinking for
This is the verification I could think of. Please suggest other verifications I could do for this scenario. |
Another approach for CLI testing would be to have source code level testing added here |
Hi @alexmt , just wanted to give you an update. Here's a 480p video that demonstrates the test in action.
This can also be run in headless mode (no browser is launched). Any feedback is appreciated. Points to consider and possible follow-on enhancements
For the first point, if multiple apps are shown in the application list, there needs to be a way to correctly identify the Sync or Delete button in the tile of the desired app. |
This is myworking file for the first test - app creation. Per the discussion from community call, these are my assumptions:
However, I'm getting the following error when running my test script: From my understand on the community call discussion, I should not be worrying about the authentication part and should assume that the session is already authenticated. What I've tried:
Please let me know if I can try something else to ensure I can properly test this code on my local environment. |
@dewan-ahmed Looking at what's happening in |
Hi @jannfis that was the issue, thank you! Now the authentication error is gone. |
Hi @alexmt, please have a look at my commit and my comment. I think the ui-tests should be 'independent' of the rest of the ArgoCD code. |
Hi @alexmt, I created the PR for step 3. #4694. See PR for instructions on how to run the tests. When reviewing, take into account the points I made in one of my earlier comments in this issue, Points to consider and possible follow-on enhancements
For the first point, if multiple apps are shown in the application list, there needs to be a way to correctly identify the Sync or Delete button in the tile of the desired app. |
Further discussion on design of smoke test: https://argoproj.slack.com/archives/CEWCP8TV5/p1604506062335700 |
Note on argo-cd slack regarding smoke test scripts cc: @alexmt |
Hi @alexmt , I'm struggling to verify Running tool: /usr/local/bin/go test -timeout 30s github.com/argoproj/argo-cd/test/smoke -run ^TestWaitApp$ panic: test timed out after 30s goroutine 19 [running]:
|
Added an agenda item on contributor call today to discuss this @alexmt . Since we went over the time, this issue was not discussed. Hoping to discuss during one of the future calls. |
…oproj#4393) Signed-off-by: Keith Chong <[email protected]>
…) (#5074) Signed-off-by: Keith Chong <[email protected]>
Signed-off-by: Keith Chong <[email protected]>
…) (#5074) Signed-off-by: Keith Chong <[email protected]> Signed-off-by: Remington Breeze <[email protected]>
…oproj#4393) (argoproj#5074) Signed-off-by: Keith Chong <[email protected]>
Signed-off-by: Keith Chong <[email protected]>
Summary
We need an automated test that simulates user behavior and can be run to catch transient errors related to racing conditions in code.
Proposal
argocd app create
/argocd app sync
/argocd app wait
commandsThe text was updated successfully, but these errors were encountered: