Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development'
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPoienar committed Nov 28, 2024
2 parents 75420f0 + 7bf2491 commit 7578eca
Show file tree
Hide file tree
Showing 38 changed files with 5,205 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
urllib3>=1.26.18
zipp==3.8.1
zipp>=3.19.1
sphinx-multiversion-scylla
34 changes: 34 additions & 0 deletions Docs/source/_static/examples~/common/csharp-android-test-unreal.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using AltTester.AltTesterUnitySDK.Driver;
using AltTester.AltTesterUnitySDK.Driver.AltReversePortForwarding;
using NUnit.Framework;

public class MyFirstTest
{
private AltDriver altDriver;

[OneTimeSetUp]
public void SetUp()
{
AltReversePortForwarding.ReversePortForwardingAndroid();
altDriver = new AltDriver();
}

[OneTimeTearDown]
public void TearDown()
{
altDriver.Stop();
AltReversePortForwarding.RemoveReversePortForwardingAndroid();
}

[Test]
public void TestStartGame()
{
altDriver.LoadScene("MainMenu");

altDriver.FindObject(By.NAME, "Close Button").Click();
altDriver.FindObject(By.NAME, "Button").Click();

var panelElement = altDriver.WaitForObject(By.NAME, "Panel");
Assert.IsTrue(panelElement.enabled);
}
}
52 changes: 52 additions & 0 deletions Docs/source/_static/examples~/common/java-android-test-unreal.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import com.alttester.AltReversePortForwarding;
import com.alttester.AltDriver;
import com.alttester.AltObject;
import com.alttester.Commands.FindObject.AltFindObjectsParameters;
import com.alttester.Commands.FindObject.AltWaitForObjectsParameters;

import java.io.IOException;

public class MyFirstTest {

private static AltDriver altDriver;

@BeforeAll
public static void setUp() throws IOException {
AltReversePortForwarding.reversePortForwardingAndroid();
altDriver = new AltDriver();
}

@AfterAll
public static void tearDown() throws Exception {
altDriver.stop();
AltReversePortForwarding.removeReversePortForwardingAndroid();
}

@Test
public void openClosePanelTest() {
altDriver.loadScene(new AltLoadSceneParams.Builder("MainMenu").build());

AltFindObjectsParams closeButtonObjectsParameters = new AltFindObjectsParams.Builder(
AltDriver.By.NAME, "Close Button")
.build();
altDriver.findObject(closeButtonObjectsParameters).Click();

AltFindObjectsParams buttonObjectsParameters = new AltFindObjectsParams.Builder(
AltDriver.By.NAME, "Button")
.build();
altDriver.findObject(buttonObjectsParameters).Click();

AltFindObjectsParams panelObjectsParameters = new AltFindObjectsParams.Builder(
AltDriver.By.NAME, "Panel")
.build();
AltWaitForObjectsParams panelWaitForObjectsParameters = new AltWaitForObjectsParams.Builder(
panelObjectsParameters).build();
AltObject panelElement = altDriver.waitForObject(panelWaitForObjectsParameters);

Assertions.assertTrue(panelElement.isEnabled());
}
}
27 changes: 27 additions & 0 deletions Docs/source/_static/examples~/common/python-android-test-unreal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import unittest

from alttester import *


class MyFirstTest(unittest.TestCase):

alt_driver = None

@classmethod
def setUpClass(cls):
AltReversePortForwarding.reverse_port_forwarding_android()
cls.alt_driver = AltDriver()

@classmethod
def tearDownClass(cls):
cls.alt_driver.stop()
AltReversePortForwarding.remove_reverse_port_forwarding_android()

def test_open_close_panel(self):
self.alt_driver.load_scene("MainMenu")

self.alt_driver.find_object(By.NAME, "Close Button").click()
self.alt_driver.find_object(By.NAME, "Button").click()

panel_element = self.alt_driver.wait_for_object(By.NAME, "Panel")
self.assertTrue(panel_element.enabled)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
*** Settings***
Library AltTesterLibrary
Suite Setup SetUp Tests
Suite Teardown Teardown Tests

*** Test Cases ***
Test Open Close Panel
Load Scene MainMenu
${close_button}= Find Object NAME Close Button
Click Object ${close_button}
${button}= Find Object NAME Button
Click Object ${button}
${panel_element}= Wait For Object NAME Panel
Should Be True ${panel_element.enabled}

*** Keywords ***
SetUp Tests
Reverse Port Forwarding Android
Initialize Altdriver

Teardown Tests
Stop Altdriver
Remove Reverse Port Forwarding Android
31 changes: 31 additions & 0 deletions Docs/source/_static/examples~/get-started/csharp-test-unreal.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using NUnit.Framework;
using AltTester.AltTesterUnitySDK.Driver;

public class MyFirstTest
{
private AltDriver altDriver;

[OneTimeSetUp]
public void SetUp()
{
altDriver = new AltDriver();
}

[OneTimeTearDown]
public void TearDown()
{
altDriver.Stop();
}

[Test]
public void TestStartGame()
{
altDriver.LoadScene("MainMenu");

altDriver.FindObject(By.NAME, "Close Button").Click();
altDriver.FindObject(By.NAME, "Button").Click();

var panelElement = altDriver.WaitForObject(By.NAME, "Panel");
Assert.IsTrue(panelElement.enabled);
}
}
49 changes: 49 additions & 0 deletions Docs/source/_static/examples~/get-started/java-test-unreal.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import com.alttester.AltDriver;
import com.alttester.AltObject;
import com.alttester.Commands.FindObject.AltFindObjectsParameters;
import com.alttester.Commands.FindObject.AltWaitForObjectsParameters;

import java.io.IOException;

public class myFirstTest {

private static AltDriver altDriver;

@BeforeClass
public static void setUp() throws IOException {
altDriver = new AltDriver();
}

@AfterClass
public static void tearDown() throws Exception {
altDriver.stop();
}

@Test
public void openClosePanelTest() {
altDriver.loadScene("MainMenu");

AltFindObjectsParameters closeButtonObjectsParameters = new AltFindObjectsParameters.Builder(
AltDriver.By.NAME, "Close Button")
.build();
altDriver.findObject(closeButtonObjectsParameters).Click();

AltFindObjectsParameters buttonObjectsParameters = new AltFindObjectsParameters.Builder(
AltDriver.By.NAME, "Button")
.build();
altDriver.findObject(buttonObjectsParameters).Click();

AltFindObjectsParameters panelObjectsParameters = new AltFindObjectsParameters.Builder(
AltDriver.By.NAME, "Panel")
.build();
AltWaitForObjectsParameters panelWaitForObjectsParameters = new AltWaitForObjectsParameters.Builder(
panelObjectsParameters).build();
AltObject panelElement = altDriver.waitForObject(panelWaitForObjectsParameters);

Assert.assertTrue(panelElement.isEnabled());
}
}
25 changes: 25 additions & 0 deletions Docs/source/_static/examples~/get-started/python-test-unreal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import unittest

from alttester import *


class MyFirstTest(unittest.TestCase):

alt_driver = None

@classmethod
def setUpClass(cls):
cls.alt_driver = AltDriver()

@classmethod
def tearDownClass(cls):
cls.alt_driver.stop()

def test_open_close_panel(self):
self.alt_driver.load_scene("MainMenu")

self.alt_driver.find_object(By.NAME, "Close Button").click()
self.alt_driver.find_object(By.NAME, "Button").click()

panel_element = self.alt_driver.wait_for_object(By.NAME, "Panel")
self.assertTrue(panel_element.enabled)
14 changes: 14 additions & 0 deletions Docs/source/_static/examples~/get-started/robot-test-unreal.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*** Settings***
Library AltTesterLibrary
Suite Setup Initialize Altdriver
Suite Teardown Stop Altdriver

*** Test Cases ***
Test Open Close Panel
Load Scene MainMenu
${close_button}= Find Object NAME Close Button
Click Object ${close_button}
${button}= Find Object NAME Button
Click Object ${button}
${panel_element}= Wait For Object NAME Panel
Should Be True ${panel_element.enabled}
Binary file modified Docs/source/_static/img/advanced-usage/case1.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 modified Docs/source/_static/img/advanced-usage/case2.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 modified Docs/source/_static/img/advanced-usage/case3.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 modified Docs/source/_static/img/advanced-usage/case4.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 modified Docs/source/_static/img/advanced-usage/case5.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 modified Docs/source/_static/img/alttester-editor/popup.png
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Docs/source/_static/img/overview/architecture1.png
Binary file not shown.
1 change: 1 addition & 0 deletions Docs/source/_static/img/overview/architecture1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/source/_static/img/overview/architecture2.png
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.
14 changes: 13 additions & 1 deletion Docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ AltTester®
==========

Through AltTester®, we provide a UI Test Automation solution for Unity
applications.
and Unreal applications.

- AltTester® Unity SDK is a free, open source asset. Its main goal is to enable UI
test automation, by instrumenting applications to get access and programmatically
control the Unity objects. Get AltTester® Unity SDK from
:alttestersdkdownload:`our website <>`.

- AltTester® Unreal SDK is a free tool designed to facilitate UI test automation
by instrumenting Unreal Engine applications. It provides programmatic access to
Unreal objects, enabling efficient test creation and execution. Get AltTester®
Unreal SDK from
:alttestersdkdownload:`our website <>`.

- AltTester® Desktop is an application allowing users to inspect the
object hierarchy and interact with their app outside the Unity Editor. Get
AltTester® Desktop from :alttesterpage:`our website <downloads/>`.
Expand All @@ -30,6 +36,11 @@ Documentation
* :doc:`/pages/overview`
* :doc:`/pages/get-started`

* :doc:`unreal-sdk`

* :doc:`/unreal-pages/overview`
* :doc:`/unreal-pages/get-started`

* :altTesterdesktopdocumentation:`AltTester® Desktop <home.html>`

* :altTesterdesktopdocumentation:`Overview <pages/overview.html>`
Expand All @@ -42,6 +53,7 @@ Documentation

Home Page <https://alttester.com/docs/sdk/2.2.0/index.html>
home
unreal-sdk
AltTester® Desktop <https://alttester.com/docs/desktop/v.2.2.0/home.html>


Expand Down
2 changes: 1 addition & 1 deletion Docs/source/pages/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ Simulates a key down.
| Name | Type | Required | Description |
| ------- | --------------- | -------- | -------------------------------------------------------------------------------------- |
| keyCode | AltKeyCode | Yes | The keyCode of the key simulated to be pressed. |
| power | int | Yes | A value between [-1,1] used for joysticks to indicate how hard the button was pressed. |
| power | int | No | A value between [-1,1] used for joysticks to indicate how hard the button was pressed. |

**_Returns_**

Expand Down
28 changes: 6 additions & 22 deletions Docs/source/pages/license.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
License
=======

AltTester® Unity SDK is licensed under the GNU General Public License v3.0. This
means that the end user has the freedom to use, share and modify the software.
It's a copyleft license, which means that if any derivative work must be
distributed, it should be distributed under the same or equivalent license
terms. As long as it's added to the development build and not distributed,
it has no restrictions for the end user.
AltTester® SDK is provided under specific licensing terms. For details
regarding the license, please refer to the **LICENSE** file included in the
SDK package. This file outlines the terms and conditions for using,
modifying, and distributing the software.

The GPL license type allows you to use this software internally in your
company, without any obligations (no need to be copyright holders for the Unity
engine).

The only obligation you have regarding this open source software is related to
distribution. If you want to distribute AltTester® Unity SDK, or some parts of it
you have to make sure you distribute it under the same license terms. For
example, if you plan to release a app containing AltTester® Unity SDK, then you’d
have to apply the same GPL3 terms to your app. Otherwise, if you only use it
for developing and testing your app, you don't have any obligations.

License Text
------------

See `LICENSE <https://github.com/alttester/AltTester-Unity-SDK/blob/master/LICENSE>`_
for more information.
If you have any questions about the license, consult the
**LICENSE** file or reach out to our support team for clarification.
6 changes: 5 additions & 1 deletion Docs/source/pages/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ AltTester® framework contains the following components:
* AltTester® Desktop (illustrated in the middle)
* AltTester® Bindings / Clients (for C#, Python, Java, Robot Framework, illustrated on the right)

![Architecture](../_static/img/overview/architecture1.png)
```eval_rst
.. figure:: ../_static/img/overview/architecture1.svg
:scale: 150 %
```

* **AltTester® Unity SDK**

Expand Down
Loading

0 comments on commit 7578eca

Please sign in to comment.