Sharing Test Results on LambdaTest
While performing automation testing with Selenium, the number of test cases that run in a queue or in parallel could be extensive. Finding a particular test case to share with your colleagues out of hundreds of automated test cases could sometimes be as challenging as finding a needle in a haystack. However, at LambdaTest we have made it easier for you to share your test results so you could collaborate faster with convenience.
If you wish to share an instance of a single test result with a member of your organization then you can share it by retrieving the Session ID and appending it into the URL of automation logs.
To retrieve the Session ID use the below command.
SessionId session = driver.getSessionId();
Share the below URL with respect to your Session ID.
https://automation.lambdatest.com/logs/?sessionID=8d56iz056f7999990472j5b85k700b2o //this is a sample Session ID
How To Share Your Test Execution Video?
Now you can also easily share a video of a specific test. To do so, you need to build a URL in the proper structure and share it. The correct syntax for the URL is:
https://automation.lambdatest.com/public/video?testID={testid/sessionid}&auth=AUTH_TOKEN
In the above URL syntax, there are 2 variables to be filled:
- TestID/SessionID: To get your TestID/SessionID, go to the Automation Dashboard, and click on the test whose TestID/SessionID is required. Once the test results are open, you can see the TestID/SessionID highlighted as shown in the image below. You can click the "i" button on the status bar to access the test metadata.
After clicking on the "i" button, you will get the required test meta information.
So suppose your SessionID is HJKXM-RHZL1-SVPWY-AB8X6, then the updated URL will be:
https://automation.lambdatest.com/public/video?testID=HJKXM-RHZL1-SVPWY-AB8X6&auth=AUTH_TOKEN
- AUTH_TOKEN: The AUTH_TOKEN or Authentication Token is created with the help of MD5, in the following format: Java:
MessageDigest m=MessageDigest.getInstance("MD5");
String s = "username:access_key";
m.update(s.getBytes(),0,s.length());
System.out.println("MD5: "+new BigInteger(1,m.digest()).toString(16));
Node:
var crypto = require('crypto');
crypto.createHash('md5').update("username:access_key").digest("hex");
Python
import hashlib
print(hashlib.md5("username:access_key".encode('utf-8')).hexdigest())
Ruby
Digest::MD5.hexdigest("username:access_key")
PHP
echo md5("username:access_key");
C#
byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes("username:access_key");
byte[] hashBytes = System.Security.Cryptography.MD5.Create().ComputeHash(inputBytes);
System.Text.StringBuilder sb = new System.Text.StringBuilder();
for (int i = 0; i < hashBytes.Length; i++)
{
sb.Append(hashBytes[i].ToString("X2"));
}
base64 = sb.ToString();
So suppose the generated AUTH_TOKEN is 331k534uf3toef, then the updated URL will be:
https://automation.lambdatest.com/public/video?testID=HJKXM-RHZL1-SVPWY-AB8X6&auth=331k534uf3toef
Make sure you are logged into LambdaTest for accessing the sharing URL. Happy testing!