Skip to content

Add integration tests utilizing JSON analysis #339

@limbonaut

Description

@limbonaut

There are some things that we can't test through GDScript as some code is not exposed for public access, or hard to check its effect. What we can do while keeping tests fast is analyze events serialized to JSON performed by internal SDKs such as Native, Cocoa, and Android. This would allow us to verify if our integration of those SDKs works as intended. It would also be quite fast and reliable.

This could also give us a chance to test things like whether the logger creates GDScript error events. Normally, we don’t expose the Exception or Threads interface to GDScript, so it wouldn’t be possible to verify this. But analyzing JSON is a reliable way to check how well our logger integrates with our internal SDKs. We could answer questions like:

  • Did the error have a stack trace?
  • Is the line number correct?
  • Is the file path correct?
  • Does the error contain frames with correct data?
  • And so on.

We can also use this technique to test things that aren’t currently fully examinable in the API, like breadcrumbs or the effects of different options.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions