GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Public Member Functions | List of all members

A test attached to a project or an events based extension. More...

#include <Test.h>

Public Member Functions

TestClone () const
 Return a pointer to a new Test constructed from this one.
 
const gd::StringGetName () const
 Get the name of the test.
 
void SetName (const gd::String &name_)
 Change the name of the test.
 
const gd::StringGetType () const
 Get the type of the test ("gameplay" for now).
 
void SetType (const gd::String &type_)
 Change the type of the test.
 
const gd::StringGetDescription () const
 Get the description of the test.
 
void SetDescription (const gd::String &description_)
 Change the description of the test.
 
const gd::StringGetSource () const
 Get the JavaScript source of the test.
 
void SetSource (const gd::String &source_)
 Change the JavaScript source of the test.
 
void SerializeTo (SerializerElement &element) const
 Serialize the test.
 
void UnserializeFrom (const SerializerElement &element)
 Unserialize the test.
 
Last run summary

A small summary of the last run of the test, persisted with the project (logs and screenshots are not persisted).

const gd::StringGetLastRunStatus () const
 Get the status of the last run: empty if never run, or "passed", "failed", "error".
 
void SetLastRunStatus (const gd::String &lastRunStatus_)
 Set the status of the last run.
 
double GetLastRunAt () const
 Get the timestamp (in milliseconds since epoch) of the last run, or 0 if never run.
 
void SetLastRunAt (double lastRunAt_)
 Set the timestamp (in milliseconds since epoch) of the last run.
 
double GetLastRunDurationMs () const
 Get the duration (in milliseconds) of the last run.
 
void SetLastRunDurationMs (double lastRunDurationMs_)
 Set the duration (in milliseconds) of the last run.
 
int GetLastRunFramesExecuted () const
 Get the number of frames executed during the last run.
 
void SetLastRunFramesExecuted (int lastRunFramesExecuted_)
 Set the number of frames executed during the last run.
 

Detailed Description

A test attached to a project or an events based extension.

A test is identified by its name and holds a JavaScript source that is run against the game at runtime by a test harness (for example, a gameplay test stepping frames, simulating inputs and asserting on the game state).

The type allows different kinds of tests to share this container in the future - only "gameplay" is used for now.


The documentation for this class was generated from the following files: