GameDriver Installation, Configuration and Execution

Now, before we get into the installation specifics, let's look at some of the prerequisites for working with GameDriver. Today, we're going to be working in Unity, so you're going to need Unity 2020 or higher. Currently, we support Unity 2020 LTS through to 2022 LTS, which stands for long-term support. We also support Unreal Engine 4.27 through to 5.1 and Visual Studio 2019 or higher. However, you can also use Rider or any other equivalent .Net IDE, as long as it supports NUnit or an equivalent .Net test execution framework. If you've never worked with game engines before, that's likely where you'll want to start, to familiarize yourself with the terminology and processes used to make games. Two of the most popular game engines, which are supported by GameDriver, are Unity and Unreal Engine. Both offer free tutorials to help you get started. and are great places to start. But for this course, we will use the latest Unity engine to demonstrate. Once you familiarize yourself with the game engine, getting started with GameDriver is easy. Simply import the GameDriver package into the project you would like to test. We're going to assets, import package, custom package, and find the correct version corresponding to your version of Unity. Simply import the entire folder structure and then wait for it to recompile. Then we simply add a license to the resources folder. If you don't have a license, it can be downloaded from, once you've registered as a member. Then simply add the GameDriver agent to an empty object in the initially loaded scene. This is the only change made to the project in the vast majority of cases, and no changes should be required to the game's code or behavior.

Next, we'll look at the test side of things. The next thing I need to do is open Visual Studio or whichever development environment you prefer, to create a .Net class library. Now, in this case, we're going to use an existing class library, which is provided on our website. That's shown here under the test sample. Now, I've already created my test library here, but we can take a look at some of the things that we need to configure in order to make this work for our test creation and execution. First, in our directives, we're including the GDIO Unity API v2 and Unity API assemblies as well as GDIO common objects. If we were using Unreal, you can see here the Unreal API and Unreal Engine 5 specifically. These are all underlined in red. What I need to do in Visual Studio, and it may differ for the environment that you're working in, is to open up my Solution Explorer and under References, add a reference. From here, I would navigate to the environment where I installed GameDriver into my Unity project or Unreal Project and I'm going to find 3 DLLs: the GDIO common objects, GDIO plugin sterilizer, and GDIO Unity API. These are the only three that are needed for us to create and execute our tests from here. Now, you'll see a lot of sample code here and some comments. This is all provided on our website under our 'Getting Started' documentation. We're just going to walk through some of these things to help you understand what they're used for and how you can modify them to test your application.

First off, we provide some basic input commands. This allows us to set parameters when we run this test from a command line, so that I can override things like where the test is being executed. Is it being run against the Unity editor, or is it being run against a standalone? We might have additional parameters for user inputs, like how many iterations do I want to run? How many players do I want to create for a multiplayer scenario? That's entirely up to you. This is provided only as an example for how to get things started. We then, within the test class or test fixture in this case, instantiate our API client. Now, here we see, and throughout the test sample, the API client API. That's the name that we've given to this instance of the API client. If this were a multiplayer scenario, I might have API client API 1, API 2, and API 3, and each of those would connect to different instances of my running game. But in this case, we're just going to be demonstrating one test running at a time

Comments are closed.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}