Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REG-1830] Add documentation for initial monkey bot and action manager implementation #78

Merged
merged 3 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/generic-bots/img/configure-bot-actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/generic-bots/img/monkey-bot-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/generic-bots/img/monkey-bot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions docs/generic-bots/monkey-bot.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
sidebar_label: 'Monkey Bot'
---

# Monkey Bot

![Monkey Bot Image](img/monkey-bot.png)

The Regression Games SDK has a built-in **Monkey Bot** that automatically determines the applicable keyboard and mouse inputs for the game under test and randomly performs them as the game is running. The SDK also offers the capability to configure the actions taken by the bot to control the functionality that is exercised by the bot.
nAmKcAz marked this conversation as resolved.
Show resolved Hide resolved

## Usage

For most games, the Monkey Bot can be quickly configured and deployed. First, the bot actions are configured through the Action Manager panel. Then, the monkey bot is started through the Regression Games Bot Manager.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For most games, the Monkey Bot can be quickly configured and deployed. First, the bot actions are configured through the Action Manager panel. Then, the monkey bot is started through the Regression Games Bot Manager.
For most games, the Monkey Bot can be quickly configured and deployed. First, the bot actions are configured through the Action Manager panel. Then, the Monkey Bot is started through the Regression Games Bot Manager.


### Configuring Bot Actions

Open the Action Manager panel by navigating to **Regression Games > Configure Bot Actions**. You can dock the panel to make it easier to access.

![Configure Bot Actions Menu Item](img/configure-bot-actions.png)

In the panel, press the **Analyze Actions** button. The SDK will now automatically analyze the game code and assets to identify all the device inputs that are applicable to the game.
nAmKcAz marked this conversation as resolved.
Show resolved Hide resolved

![Initial Action Manager Panel](img/action-manager-panel-initial.png)

:::info Note
The automated analysis supports commonly used device input APIs from the Legacy Input Manager, Input System, and Unity UI systems. However, the use of non-standard input handling libraries is not supported. Where possible, the analysis will emit a warning if it is unable to resolve an input.
nAmKcAz marked this conversation as resolved.
Show resolved Hide resolved
:::

After the analysis completes, you will see each device input associated with the type of object that listens for it. You can select an action to view more details about it. The checkbox next to each action can be unchecked to exclude the action from consideration by the bot. For example, you may want to exclude "Quit", "Pause", or "Exit" keys or buttons that may interfere with the bot's ability to progress through the game.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When it says "you will see each device input associated with the type of object that listens for it", is object the right word? This might be confused with game object, but isn't it more about MonoBehaviours?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that could be confusing. Technically it might not be a MonoBehaviour, e.g. it could be a UnityEngine.UI.Button if it came from Unity UI. To be accurate I've changed this to "component", but do let me know if you think it could be clearer to call it a MonoBehaviour anyways.


![Final Action Manager Panel](img/action-manager-panel-final.png)

### Running The Monkey Bot

Once you've decided on the actions to include, start the game and navigate to the point where you want the random test to begin. Press the Regression Games logo at the bottom right to open the Regression Games Bot Manager. From here, select the **RGMonkeyBot** behavior and press **Start Bot**. The monkey testing bot will now begin to automatically exercise a variety of game functionality. The bot can be stopped at any time by opening the overlay again and pressing the **Delete** or **Stop All** button.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Once you've decided on the actions to include, start the game and navigate to the point where you want the random test to begin. Press the Regression Games logo at the bottom right to open the Regression Games Bot Manager. From here, select the **RGMonkeyBot** behavior and press **Start Bot**. The monkey testing bot will now begin to automatically exercise a variety of game functionality. The bot can be stopped at any time by opening the overlay again and pressing the **Delete** or **Stop All** button.
Once you've decided which actions to include, start the game and navigate to the point where you want random testing to begin. Press the Regression Games logo in the bottom right-hand corner of the game to open the Regression Games Bot Manager. From here, select the **RGMonkeyBot** behavior and press **Start Bot**. The Monkey Bot will now begin to automatically exercise a variety of game functionality. The bot can be stopped at any time by opening the overlay again and pressing the **Delete** or **Stop All** button.


![Monkey Bot Demo](img/monkey-bot-demo.gif)

## Feedback

We are constantly iterating on and improving our tools!
If you'd like to report any limitations, bugs, or if you'd like to request a feature,
please fill out [this feedback form.](https://d7y6yysps34.typeform.com/to/MYieIsHV)
7 changes: 7 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ const sidebars = {
],
},
"authenticating-with-api-keys",
{
type: "category",
label: "Generic Bots",
items: [
"generic-bots/monkey-bot"
]
},
{
type: "category",
label: "Custom Bots",
Expand Down
Loading