Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

How to download Firebase Test Lab matrix artifacts?

$
0
0

Is there a way to download Firebase Test Lab matrix artifacts using Cloud Functions and probably save ourselves the trouble of creating another service account to authenticate with GCloud CLI?

exports.testMatrixCompletion = functions.testLab.testMatrix().onComplete(testMatrix => {    // TestMatrix captures details about a test run: https://firebase.google.com/docs/reference/functions/firebase-functions.testlab.testmatrix    const matrixId = testMatrix.testMatrixId;    switch (testMatrix.state) {        case 'FINISHED':            console.log(`Test matrix ${matrixId} finished with outcome: ${testMatrix.outcomeSummary}`);            break;        case 'INVALID':            console.log(`Test matrix ${matrixId} was marked as invalid: ${testMatrix.invalidMatrixDetails}`);            break;        default:            console.log(`Test matrix ${matrixId} completed with state ${testMatrix.state}`);    }    console.log(`Test matrix ${matrixId} completed with client details ${testMatrix.clientInfo}`);    if (!!testMatrix.resultStorage.resultsUrl) {        console.log(`Test results are available at ${testMatrix.resultStorage.resultsUrl}`);    }    // TODO: Cache the test matrix results and store it to a cloud storage solution where download url of files are accessible for public,    // one quick solution is to use Firebase Cloud Storage here to avoid extra authentication with tools like GCloud CLI and get the download url after success upload.    return true;});

Currently we have this simple setup and we are hoping to download files from here.

enter image description here


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>