I'm doing integration test in cloud foundry and I want to generate code coverage report. I found the jacoco agent in cloud foundry https://github.com/cloudfoundry/java-buildpack/blob/master/docs/framework-jacoco_agent.md. But it only supports tcpclient mode. So is there any way to provide a tcpserver mode agent? Or is there any way I can do to do the integration test in cloud foundry?
Related
Normally, you can see under "Usage and billing" the usage of all Firebase Services. We have integrated integration test with Firebase Test Lab into our CI. Now I want to know how much usage we use and when do we need to pay for our usage.
Is there any view in Firebase or Google Cloud Platform to the use Firebase Test Lab usage of the current project?
It appears you are currently using the Firebase Spark free tier? On that plan you may run tests on 10 virtual devices and 5 physical devices each day.
If you're using the Blaze pay-as-you-go plan, you can see Test Lab device usage in the Cloud Console. Start at https://console.cloud.google.com/billing and select your project and billing plan. From there you can view usage graphs and generate billing reports.
I am getting higher latency when invoking Cloud Run using Firebase as described in the below tutorial.
https://firebase.google.com/docs/hosting/cloud-run
Response time:
Firebase hosting invoking Cloud Run: 785ms(relatively very high as compared to native Cloud Run response time)
Native Cloud Run: 170ms
Note: We are using the same region/location for Firebase and Cloud Run: asia-northeast1
What you expected to happen:
Latencies from both should be comparable or the same.
1- Call any URL from Firebase hosting invoking Cloud Run(refer attached screenshot)
2- Call any URL from Native Cloud Run(refer attached screenshot)
I have a background service on google cloud platform app engine.
Service is using generic host to schedule the task now i want to run the service on demand, so what are the possible ways to do this?
Can i achieve this using google pub/sub?
Please consider using Google Cloud Functions: https://cloud.google.com/functions/. Google Cloud Functions (GCF) is a lightweight compute solution for developers to create single-purpose, stand-alone functions that respond to Cloud events without the need to manage a server or runtime environment. You can use a Background Function that is triggered by a Cloud Pub/Sub message. For more details, see https://cloud.google.com/functions/docs/tutorials/pubsub.
Firebase Cloud Functions run on top of GCP, so, do they support using a vpc connector?
What I'm trying to achieve is to limit a forward-proxy server to only accept requests from the internal network, but since Cloud Functions doesn't support static IPs, the only way would be via vpc connector.
This seems now to be handled in latest firebase-tools v8.9.0 version.
Must be used in conjunction with firebase-functions v3.11.0 or higher
https://github.com/firebase/firebase-tools/releases/tag/v8.9.0
functions
.runWith({
vpcConnector: 'test-connector',
vpcConnectorEgressSettings: 'PRIVATE_RANGES_ONLY'
})
.auth.user()
.onCreate((user) => user);
Cloud Functions for Firebase doesn't actually run "on top of" GCP. Firebase just adds tools and SDKs that make Cloud Functions easier to use for some developers. The core Cloud Functions product is exactly the same, no matter if you're building and deploying with Firebase tools or gcloud.
You should still be able to configure a VPC connector for functions deployed with the Firebase CLI. You will just not able able to configure it on the command line like you can with gcloud. Instead, you will have to configure the connector in the Cloud console after deploying the function, exactly as described in the documentation you linked to.
Since Firebase is just a wrapper for Google Cloud Functions, just bypass the Firebase CLI and use the one with more parameters. (Google Cloud CLI)
i.e.
$ gcloud functions deploy <function_name> --trigger-http --runtime nodejs10 --vpc-connector projects/<your_project_name>/locations/<your-vpc-region>/connectors/<vpc_name> --service-account <your-role-name>
Source:
https://cloud.google.com/functions/docs/networking/connecting-vpc
Trying to write integrations tests for HTTPS function (implemented as an express app) that use Firestore as DB
Since its an integration test, I don't want to mock the Firestore DB in this case, however, since they perform network calls, they take time to execute
Is there a Firestore local emulator to use in this scenario? There is an option to config Firestore in offline mode, maybe that's the way? Didn't find any documentation in Firebase on this use case
AskFirebase
You have to setup a Firestore emulator locally (assuming you already have firebase-cli installed):
$ firebase setup:emulators:firestore
Then run the emulator:
$ firebase serve --only firestore
With the emulator running, you can run your test suites.
In order to write tests you can use the #firebase/testing package. For more information, check the official documentation here.
There is also an official quickstart repository on GitHub, which shows how to test Firestore locally, both using JavaScript and Typescript. You can find it here.