This project contains tooling for conformance and validation of Function
Frameworks to the Functions Framework contract.
Quickstart
In your Functions Framework repo:
Create a set of locally-runnable test functions – one function for each signature type.
Each function write its inputs to the file function_output.json.
The http functions should write the request body.
The cloudevent function should serialize the CloudEvent parameter to
JSON and write the resulting string.
The event (legacy event) function should serialize the data and context
parameters to JSON in the format:
{"data": ...data..., "context": ...context...}
and write the resulting string.
Build the test client:
cd functions-framework-conformance/client && \
go build
This will create a client binary in functions-framework-conformance/client directory.
You can use this binary to test the conformance of Function Frameworks.
Invoke the client binary with the following command to run your function server and
the type of the function.