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

[Feature Request] Test Restart After Failure #1920

Closed
dannmf opened this issue Aug 16, 2024 · 8 comments
Closed

[Feature Request] Test Restart After Failure #1920

dannmf opened this issue Aug 16, 2024 · 8 comments
Labels
waiting for customer response More information is needed from the customer before we can progress on the issue

Comments

@dannmf
Copy link

dannmf commented Aug 16, 2024

Is your feature request related to a problem? Please describe.

Describe the solution you'd like
In the testing environment I use, I run a loop performing a specific routine. When a test fails, it does not restart automatically. Is there any way to achieve this, or would it be a feature for the future?

@dannmf dannmf added the enhancement New feature request or improvement of an existing feature label Aug 16, 2024
@bartekpacia
Copy link
Contributor

Bom dia Daniel, does #1607 sound like what you need? Otherwise, could you draft what would you like us to implement? A new CLI flag e.g.?

@bartekpacia bartekpacia added waiting for customer response More information is needed from the customer before we can progress on the issue and removed enhancement New feature request or improvement of an existing feature labels Aug 16, 2024
@dannmf
Copy link
Author

dannmf commented Aug 16, 2024

From what I understand, in this case, it requires the test to start from another point to test the new implementation.

In my case, it would be more for failures, possibly as a flag in the command like -c. Currently, when the test (using the -c flag) fails, it is necessary to press ENTER to restart it.

Since my test involves a loop and often runs overnight, I need it to store the logs as usual and automatically restart when a failure occurs.

@github-actions github-actions bot removed the waiting for customer response More information is needed from the customer before we can progress on the issue label Aug 16, 2024
@bartekpacia
Copy link
Contributor

Can you clarify what you mean by "I run a loop"? Do you mean:

#!/usr/bin/env sh
command="maestro test ./my_fow"
max_retries=5
retries=0
while true; do
    $command
    
    if [ $? -eq 0 ]; then
        echo "Command succeeded."
        break
    else
        retries=$((retries + 1))
        echo "Command failed. Attempt $retries of $max_retries."
    fi

    if [ $retries -ge $max_retries ]; then
        echo "Command failed after $max_retries attempts."
        exit 1
    fi
done

@dannmf
Copy link
Author

dannmf commented Aug 16, 2024

Basically, that's it. In my flow, I use repeat.

name: "Realiza rotina com 3000 vendas" 
---
- runFlow: 
    file: ../utils/auth/login_routine.yaml
    label: ' 🔑 Realizando Login'
- runFlow: 
    file: ../utils/access_modules/access_catalog.yaml
    label: '🧪 Acessando Catálogo'
- repeat:
    times: 3000
    commands:
      - runFlow: 
          file: ../catalog/catalog_sale_test.yaml
          label: '🧪 Teste: 1000 Vendas'

Would I use this as a command? How would it look?

@dannmf
Copy link
Author

dannmf commented Aug 19, 2024

Bom dia! After I analyzed the shell command better, the implementation worked. I'm just having some issues related to logs now. When using debug-output, it generates correctly in the folder but throws a Java error in .cache/maestro/logs.
image

@bartekpacia
Copy link
Contributor

Hey, thanks for getting back.

So, are you satisfied now and can this issue be closed? :)

If you believe that is a bug, please create a new issue (follow "bug report" template) and attach reproduction steps.

@bartekpacia bartekpacia added the waiting for customer response More information is needed from the customer before we can progress on the issue label Aug 20, 2024
Copy link

github-actions bot commented Sep 3, 2024

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it.

Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. When creating a new issue, please make sure to diligently fill out the issue template.

Thank you for your contribution to our open-source community!

@github-actions github-actions bot closed this as completed Sep 3, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.
Thank you for helping keep us our issue tracker clean!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
waiting for customer response More information is needed from the customer before we can progress on the issue
Projects
None yet
Development

No branches or pull requests

2 participants