Codefresh Allure Trend - testing

I am using Allure in code fresh. I followed below documentation to configure.
https://codefresh.io/docs/docs/testing/test-reports/
But I am not able to see the trends in the allure report. Is there any changes I should do to get trends in the report. And also in the unit test reporting step as mentioned in the documentation
I have error line Error during adding allure history to test report, cause: Access Denied. I am thinking this might be the reason. Is there any way to fix this. Thanks.

Had a similar issue to this - Trend not appearing within Allure report on Codefresh
It turned out that our issue was down to the way we have configured the S3 bucket. We had to slightly change the permissions for the S3 bucket so that it the ability to perform actions on the bucket (Such as listing all the objects within it - Which Codefresh wasn't able to do which is why the history / trend wasn't being generated. This was the permissions we deployed for our S3 bucket.
Statement = [
{
Action = [
"s3:*"
]
Effect = "Allow"
Resource = "${aws_s3_bucket.our-integration-name.arn}/*"
},
{
Action = [
"s3:*"
]
Effect = "Allow"
Resource = aws_s3_bucket.our-integration-name.arn
}
]

Related

How to create one time use deep links?

I'm finding conflicting information on creating one time use deep links.
expire desktop_url generated through branch SDK after one time use
The documentation on "type" says "Must be an int. Set to 1 to limit deep link to a single use. Set to 2 to make the link show up under Quick Links while adding $marketing_title to data. Does not work with the Native SDKs." (https://docs.branch.io/links/integrate/)
I created a link using the included JSON with a POST to https://api2.branch.io/v1/url.
{
"branch_key": "*********************",
"data": {
"entityId": "282fd3da-5200-45f4-80a2-4f3a1c36bff6",
"$link_exp_date": 1567271700000
},
"type": 1,
"feature": "test_feature",
"tags": []
}
I expected the URL to be available for one time use. However I am able to successfully use the link multiple times until it expires. And retrieving the link using GET https://api.branch.io/v1/url doesn't return any properties that indicate the link was used.
Even before creating a deep link and testing, you need to integrate the Branch SDK in your respective app (Android, iOS etc).
The simple way to create a deep link is via dashboard and test this when the app is installed.

Jira - XRay- How to get the total of defects created during a test execution

I'm creating a script that goes into all tests into a test execution. I'd like to get the amount of defects for that particular test execution. Is that a way to get it using rest api?
Xray enables exporting Cucumber tests to be exported as .feature file that further can be used in your automated tests. To do so use this export endpoint
To import the automated test results back to Jira used this import endpoint
Usually APIs will be executed in conjunction with CI/CD tools, like Jenkins.
In this article you can see that the total number of defects can be view via the Jira UI.
And finally, this video shows how tests are imported and exported via the UI.
Tests can be created via API as well, see here.
I think it all depends on your testplans. When those contain all tests you should be able to execute the test via the endpoint rest/raven/1.0/api/testexec/<testExecution>.
Maybe it will be good to ask the very same question in the atlassian community.
Sorry for not being able to fully answer your question, but I think you now should have some things to read :)
There is one way that is more straightforward.
You can make use of the "Test Execution Defects" custom field, which is a calculated field.
Then you just need to use Jira's REST API and obtain information for the related Test Execution issue, for that specific custom field that returns an array. The number of elements corresponds to the number of defects.
Example of HTTP GET request:
https://sandbox.xpand-it.com/rest/api/2/issue/BOOK-31?fields=customfield_11802
Example of response:
{
"expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
"id": "20130",
"self": "https://sandbox.xpand-it.com/rest/api/2/issue/20130",
"key": "BOOK-31",
"fields": {
"customfield_11802": [
"20131"
]
}
}
Another way would be to use the JQL function "defectsCreatedDuringTestExecution ()", as mentioned here: https://docs.getxray.app/display/XRAY/Enhanced+querying+with+JQL
Then you could do a Jira REST API search call.
Example of HTTP GET search request using the JQL function:
https://sandbox.xpand-it.com/rest/api/2/search?jql=issue%20in%20defectsCreatedDuringTestExecution(BOOK-31)

Check In and Check Out using APIS

I have tried to check In and check Out a Bulk guest using /4.0/guestlists/{guestlist_id}/guests/_bulk API function. But it's not updating the status. Except for Status, it is updating everything. Can anyone help me out to solve this problem?
The Social Tables API doesn't currently support updating the checked_in_status using the /4.0/guestlists/{guestlist_id}/guests/_bulk route.
To achieve this functionality you will need to use:
/4.0/guestlists/{guestlist_id}/guests/checkin
body:
{
guests: ["guest_id_1", "guest_id_2"],
event_name: "Some Event Name" // optional. used by check-in notifictations
}
This currently does not support setting to checked-out or to reset the Guest to non checked-in state. If this is the desired functionality please let us know and we can add it to our external API.
Please feel free to ask if you have any other questions!
UPDATED
You can now provide a checked-in status to the bulk check-in route
{
"guests": [
"99b4ae20-2779-11e6-b0b7-13c2616041ae",
"99b4ae21-2779-11e6-b0b7-13c2616041ae"
],
"checked_in": 1,
"event_name": "Some Event Name" // optional. used by check-in notifictations
}

Container storage location with specified provisioning code not available

On creating a bucket using s3 API, I get the
Container storage location with specified provisioning code not available (Service: Amazon S3; Status Code: 400; Error Code: InvalidLocationConstraint; Request ID: f377cc84-2e76-490b-8161-4407a4b8d9d7), S3 Extended Request ID: null error.
However, I can create a bucket using the service portal on Softlayer. Programmatically I can get the latest list of buckets and even delete it, but creation throws the above error.
A recent update has introduced unintended behavior around bucket creation, and we're working to fix it. The system is expecting a Location Constraint of us-standard. Provide the following XML block in the body of the request:
<CreateBucketConfiguration>
<LocationConstraint>us-standard</LocationConstraint>
</CreateBucketConfiguration>
If using an SDK, you'd follow the conventions of the particular library you are using. For example, using boto3 creating a new bucket might look like this:
bucket = s3.create_bucket(Bucket='my-bucket',
CreateBucketConfiguration={'LocationConstraint': 'us-standard'})
In java, it would look like:
s3.createBucket(bucketName, "us-standard");
Here's a link to the docs (we're steadily improving them).
Let me know if that doesn't help, or if you are using another tool or SDK. :)

Error 400 Bad Request when querying for list of projects

I am trying to query the list of projects available to a user with the Asana API as shown in their documentation under the title "Show all projects in a workspace or organization", but I am encountering a 400 Error.
The error message details being returned are:
{
"errors": [
{
"message": "Missing required `team` field"
}
]
}
I am using the following endpoint except that I am using my actual workspace ID:
https://app.asana.com/api/1.0/workspaces/14916/projects
The documentation for this example does not mention a team field, and the only reference to the team field applies to create-only operations. Does anyone have an idea as to what my issue is?
Without having additional information, it sounds like the query might actually be using the wrong HTTP verb - maybe POST? - rather than a GET.
Can you show the exact request you make, how you make it? An example with curl is usually a good common denominator, but code would work as well.