-
Notifications
You must be signed in to change notification settings - Fork 3
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: Add qa-automation orb #82
Conversation
9dc7ce9
to
3ca4751
Compare
bcfd248
to
0be70b0
Compare
0be70b0
to
3c29480
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super interesting and nice addition!
A few comments but looks a really nice PR, thanks a lot @DReigada
@@ -0,0 +1,48 @@ | |||
parameters: | |||
test_path: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand what this parameter does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the path to the test suite to run, which is locate inside the docker image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we have a fixed number of possibilities?
can we list them, at least in a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can provide the list:
Dev -> Suite/API/DEV.xml,Suite/WEB/DEV.xml,Suite/WEB/DEV2.xml,Suite/E2E/DEV.xml
Staging -> Suite/API/DEV.xml,Suite/WEB/STAGING.xml,Suite/WEB/STAGING.xml,Suite/E2E/STAGING.xml
Prod -> Suite/API/PROD.xml,Suite/WEB/PROD.xml,Suite/E2E/PROD.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New suites can be added, it seems too cumbersome to add them here every time there's a change in the qa-automation repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I suggest doing is adding to the description a link to the qa-automation repo, where all files are located
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree into keeping this list in the qa-automation-test
repository, and here we keep a link.
Works for you @jonathancarvalheiro ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good, or directly to this link: https://handbook.dev.codacy.org/product/engineering/QA/feature-test-process.html#suites-to-run-for-each-environment, what you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
up to you, either way I'm good with it 👍
test_path: | ||
description: "The path to the test suite to run" | ||
type: string | ||
project_name: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a fixed number of option I suppose, can we list them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. @medleycodacy @jonathancarvalheiro any idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andreaTP Could not be fixed number, since you can create your specific project on RP. But we can suggest or have a default :qa-automation-tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this parameter should be called possibly:
report_portal_project_name
correct?
@jonathancarvalheiro what happens if we set a name that is not "registered" already in RP?
Do we have a little description on how to "create a project" in RP?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave the description in here.
Create a project on RP.
- Go to the RP and login with the superadmin user (check Bitwarden for that).
- Click on the right top corner in the user options, and select Administrate.
- Click on the Add New Project button, and define the project name.
Something like this, @andreaTP ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add that to the docs of the qa-automation repo?
And add a link to there in this description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes @jonathancarvalheiro but I think @DReigada suggestion stands. please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created PR to handbook: https://github.com/codacy/handbook/pull/16/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
project_name: | ||
description: "The name of the project in report portal" | ||
type: string | ||
launch_name: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a parameter for report portal? in case I suggest to call it report_portal_name
or something alike
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather keep the name and improve the description.
By using this orb you know that you are reporting to report portal, it seems redundant to "report_portal" to the name of the variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here some parameters are referring to the qa-automation-test
suite itself and other to the RP integration.
At best of my knowledge you can disable the integration with report_portal
(@jonathancarvalheiro can you confirm?)
so
By using this orb you know that you are reporting to report portal
is not correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not configurable, the only way it's not to set the RP parameters. I'll check if the docker image works without setting the RP parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I checked, and it's mandatory to have the RP parameters defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I purpose to leave like it is right now, and when I put this as a configuration, I do a PR in here as well.
description: "The name to give to the test launch" | ||
type: string | ||
default: EXTERNAL_TEST_RUN | ||
launch_description: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comment above apply here as well
description: "The description to give to the test launch" | ||
type: string | ||
default: "Automated Tests Ran by CircleCI" | ||
launch_tag: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as well
LAUNCH_NAME: << parameters.launch_name >> | ||
LAUNCH_DESCRIPTION: << parameters.launch_description >> | ||
LAUNCH_TAG: << parameters.launch_tag >> | ||
RP_ENDPOINT: https://reportportal.dev.codacy.org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this URL should be a parameter, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The report portal URL is always the same, we only have one instance. Making this a parameter seems it will only increase the complexity of the parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think I'm outdated ... we used to have an instance per environment (@jonathancarvalheiro ?).
Since this code is public I don't know if we should keep this url hardcoded here, I think the best is to have it in env variable in the context.
We don't "publicize" our internal infrastructure urls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andreaTP, no we always had one instance for all environments.
But I agree as using that with an environment variable on the circle ci e.g.
There's some that we have to set on the circle ci in order for this to work:
RP_ENDPOINT; ENCRYPTION_KEY; RP_CIRCLECI_UUID
Could worth to be mentioned.
this has cobwebs already 🕸️ closing since this diverged in so many ways that it would not be helpful to re-start this from this PR |
No description provided.