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 May 21, 2024
2 parents 43bcc7f + 37bd87c commit c0d2b5f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Assets/AltTester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.1.1",
"displayName": "AltTester Unity SDK",
"description": "AltTester Unity SDK is an open-source UI driven test automation tool that helps you find objects in your game and interacts with them using tests written in C#, Python, Java or Robot Framework.",
"unity": "2021.3",
"unity": "2020.3",
"documentationUrl": "https://alttester.com/docs/sdk/latest/",
"author": {
"name": "AltTester",
Expand Down
10 changes: 9 additions & 1 deletion Bindings~/java/src/main/java/com/alttester/AltObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,23 @@ public <T> T getComponentProperty(AltGetComponentPropertyParams altGetComponentP
* @param altWaitForComponentPropertyParams -AltGetComponentPropertyParams
* altGetComponentPropertyParams* ,
* double timeout , double interval , T
* propertyValue* , Altoject obj*.
* propertyValue* , AltObject obj*.
* @param propertyValue - The value of the property expected
* @param returnType - The type of the property
* @return - The value of the given component property
*/
@Deprecated
public <T> T WaitForComponentProperty(AltWaitForComponentPropertyParams<T> altWaitForComponentPropertyParams,
T propertyValue,
Class<T> returnType) {

return waitForComponentProperty(altWaitForComponentPropertyParams, propertyValue, returnType);
}

public <T> T waitForComponentProperty(AltWaitForComponentPropertyParams<T> altWaitForComponentPropertyParams,
T propertyValue,
Class<T> returnType) {

altWaitForComponentPropertyParams.setAltObject(this);
T response = new AltWaitForComponentProperty<T>(messageHandler,
altWaitForComponentPropertyParams,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public void testWaitForComponentProperty() throws InterruptedException {
componentName, propertyName, "").build();
AltWaitForComponentPropertyParams<String> altWaitForComponentPropertyParams = new AltWaitForComponentPropertyParams.Builder<String>(
altGetComponentPropertyParams).build();
String propertyValue = altElement.WaitForComponentProperty(
String propertyValue = altElement.waitForComponentProperty(
altWaitForComponentPropertyParams,
"__default__",
String.class);
Expand All @@ -369,7 +369,7 @@ public void testWaitForComponentPropertyComponentNotFound() throws InterruptedEx
altGetComponentPropertyParams).build();
assertThrows(ComponentNotFoundException.class,
() -> {
Boolean propertyValue = altElement.WaitForComponentProperty(
Boolean propertyValue = altElement.waitForComponentProperty(
altWaitForComponentPropertyParams,
false,
Boolean.class);
Expand All @@ -394,7 +394,7 @@ public void TestWaitForComponentPropertyNotFound() throws InterruptedException {
altGetComponentPropertyParams).build();
assertThrows(PropertyNotFoundException.class,
() -> {
Boolean propertyValue = altElement.WaitForComponentProperty(
Boolean propertyValue = altElement.waitForComponentProperty(
altWaitForComponentPropertyParams,
false,
Boolean.class);
Expand All @@ -418,7 +418,7 @@ public void TestWaitForComponentPropertyTimeOut() throws InterruptedException {
altGetComponentPropertyParams).withTimeout(2).build();
assertThrows(WaitTimeOutException.class,
() -> {
altElement.WaitForComponentProperty(
altElement.waitForComponentProperty(
altWaitForComponentPropertyParams,
"Test",
String.class);
Expand All @@ -443,7 +443,7 @@ public void TestWaitForComponentPropertyAssemblyNotFound() throws InterruptedExc
altGetComponentPropertyParams).build();
assertThrows(AssemblyNotFoundException.class,
() -> {
altElement.WaitForComponentProperty(
altElement.waitForComponentProperty(
altWaitForComponentPropertyParams,
false,
Boolean.class);
Expand Down
36 changes: 18 additions & 18 deletions Docs/source/pages/alttester-with-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,8 @@ Keep in mind that the setup is different for Android and iOS.
- wget https://alttester.com/app/uploads/AltTester/desktop/AltTesterDesktopLinuxBatchmode.zip
- unzip AltTesterDesktopLinuxBatchmode.zip
- cd AltTesterDesktopLinux
- chmod +x "AltTester(R) Desktop.x86_64"
- ./"AltTester(R) Desktop.x86_64" -batchmode -port 13000 -license $LICENSE_KEY -nographics -termsAndConditionsAccepted &
- chmod +x AltTester Desktop.x86_64
- ./AltTesterDesktop.x86_64 -batchmode -port 13000 -license $LICENSE_KEY -nographics -termsAndConditionsAccepted &
```
The `&` symbol is used to make the application run in the background. Failure to add the symbol will cause the commands following it to not be triggered.

Expand All @@ -826,7 +826,7 @@ Keep in mind that the setup is different for Android and iOS.
- kill the AltTester® Desktop process
```
- cd AltTesterDesktopLinux
- kill -2 $(ps -ef | awk '/AltTester\(R\) Desktop.x86_64/{print $2}')
- kill -2 `ps -ef | awk '/AltTesterDesktop.x86_64/{print $2}'`
```
- **for remote connection** - a way to connect to AltTester® Server, within the AltTester® Desktop application is by installing AltTester® Desktop on an [Amazon EC2 Instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Instances.html). The details of creating an EC2 Instance are out of scope, however, these are the main things to take into account for a successful connection:
- create a [Windows instance](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/EC2Win_Infrastructure.html)
Expand All @@ -841,7 +841,7 @@ Keep in mind that the setup is different for Android and iOS.
```eval_rst
.. image:: ../_static/img/alttester-with-cloud/aws-connect-to-instance.png
```
- [Download AltTester® Desktop for Windows](https://alttester.com/app/uploads/AltTester/desktop/AltTester(R)%20Desktop__v2.1.1.exe) and install it on the Instance
- [Download AltTester® Desktop for Windows](https://alttester.com/app/uploads/AltTester/desktop/AltTesterDesktop__v2.1.1.exe) and install it on the Instance
- [Associate an Elastic IP](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-associating), so that the IP remains constant after each opening of the instance
```eval_rst
.. image:: ../_static/img/alttester-with-cloud/aws-associate-elastic-ip.png
Expand Down Expand Up @@ -1022,8 +1022,8 @@ Keep in mind that the setup is different for Android and iOS.
- wget https://alttester.com/app/uploads/AltTester/desktop/AltTesterDesktopLinuxBatchmode.zip
- unzip AltTesterDesktopLinuxBatchmode.zip
- cd AltTesterDesktopLinux
- chmod +x "AltTester(R) Desktop.x86_64"
- ./A"AltTester(R) Desktop.x86_64" -batchmode -port 13000 -license $LICENSE_KEY -nographics -termsAndConditionsAccepted &
- chmod +x AltTesterDesktop.x86_64
- ./AltTesterDesktop.x86_64 -batchmode -port 13000 -license $LICENSE_KEY -nographics -termsAndConditionsAccepted &
```
The `&` symbol is used to make the application run in the background. Failure to add the symbol will cause the commands following it to not be triggered.

Expand All @@ -1041,7 +1041,7 @@ Keep in mind that the setup is different for Android and iOS.
- kill the AltTester® Desktop process:
```
- cd AltTesterDesktopLinux
- kill -2 $(ps -ef | awk '/AltTester\(R\) Desktop.x86_64/{print $2}')
- kill -2 `ps -ef | awk '/AltTesterDesktop.x86_64/{print $2}'`
```

- **for remote connection** - a way to connect to AltTester® Server, within the AltTester® Desktop application is by installing AltTester® Desktop on an [Amazon EC2 Instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Instances.html). The details of creating an EC2 Instance are out of scope, however, these are the main things to take into account for a successful connection:
Expand All @@ -1057,7 +1057,7 @@ Keep in mind that the setup is different for Android and iOS.
```eval_rst
.. image:: ../_static/img/alttester-with-cloud/aws-connect-to-instance.png
```
- [Download AltTester® Desktop for Windows](https://alttester.com/app/uploads/AltTester/desktop/AltTester(R)%20Desktop__v2.1.1.exe) and install it on the Instance
- [Download AltTester® Desktop for Windows](https://alttester.com/app/uploads/AltTester/desktop/AltTesterDesktop__v2.1.1.exe) and install it on the Instance
- [Associate an Elastic IP](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-associating), so that the IP remains constant after each opening of the instance
```eval_rst
.. image:: ../_static/img/alttester-with-cloud/aws-associate-elastic-ip.png
Expand Down Expand Up @@ -1183,7 +1183,7 @@ You can connect to AltTester® Desktop in two ways in order to run the tests ser

- run command:
```
"AltTester(R) Desktop.exe" -batchmode -port 13000 -license <your_license_key> -nographics -logfile LOGFILE.txt
AltTesterDesktop.exe -batchmode -port 13000 -license <your_license_key> -nographics -logfile LOGFILE.txt
```

We have now a VM where AltTester® Server is listening for connections. Further on we will use the IP of this machine to have the communication between the main actors.
Expand All @@ -1201,13 +1201,13 @@ You can connect to AltTester® Desktop in two ways in order to run the tests ser
wget https://alttester.com/app/uploads/AltTester/desktop/AltTesterDesktopLinuxBatchmode.zip
unzip AltTesterDesktopLinuxBatchmode.zip
cd AltTesterDesktopLinux
chmod +x ./"AltTester(R) Desktop.x86_64"
./"AltTester(R) Desktop.x86_64" -batchmode -port 13000 -license $LICENSE_KEY -nographics -termsAndConditionsAccepted &
chmod +x ./AltTesterDesktop.x86_64
./AltTesterDesktop.x86_64 -batchmode -port 13000 -license $LICENSE_KEY -nographics -termsAndConditionsAccepted &
```

Kill the AltTester® Desktop process:
```
kill -2 $(ps -ef | awk '/AltTester\(R\) Desktop.x86_64/{print $2}')
kill -2 `ps -ef | awk '/AltTesterDesktop.x86_64/{print $2}'`
```

#### **Preparation steps**
Expand Down Expand Up @@ -1433,7 +1433,7 @@ We used [Azure](https://azure.microsoft.com/en-us/products/virtual-machines/) to

- run command:
```
"AltTester(R) Desktop.exe" -batchmode -port 13000 -license <your_license_key> -nographics -logfile LOGFILE.txt
AltTesterDesktop.exe -batchmode -port 13000 -license <your_license_key> -nographics -logfile LOGFILE.txt
```

We have now a VM where AltTester® Server is listening for connections. Further on we will use the IP of this machine to have the communication between the main actors.
Expand Down Expand Up @@ -1643,7 +1643,7 @@ You can connect to AltTester® Desktop in two ways in order to run the tests ser

- run command:
```
"AltTester(R) Desktop.exe" -batchmode -port 13000 -license <your_license_key> -nographics -logfile LOGFILE.txt
AltTesterDesktop.exe -batchmode -port 13000 -license <your_license_key> -nographics -logfile LOGFILE.txt
```

We have now a VM where AltTester® Server is listening for connections. Further on we will use the IP of this machine to have the communication between the main actors.
Expand All @@ -1661,13 +1661,13 @@ You can connect to AltTester® Desktop in two ways in order to run the tests ser
wget https://alttester.com/app/uploads/AltTester/desktop/AltTesterDesktopLinuxBatchmode.zip
unzip AltTesterDesktopLinuxBatchmode.zip
cd AltTesterDesktopLinux
chmod +x ./"AltTester(R) Desktop.x86_64"
./"AltTester(R) Desktop.x86_64" -batchmode -port 13000 -license $LICENSE_KEY -nographics -termsAndConditionsAccepted &
chmod +x ./AltTesterDesktop.x86_64
./AltTesterDesktop.x86_64 -batchmode -port 13000 -license $LICENSE_KEY -nographics -termsAndConditionsAccepted &
```

Kill the AltTester® Desktop process:
```
kill -2 $(ps -ef | awk '/AltTester\(R\) Desktop.x86_64/{print $2}')
kill -2 `ps -ef | awk '/AltTesterDesktop.x86_64/{print $2}'`
```

#### **Preparation steps**
Expand Down Expand Up @@ -1880,7 +1880,7 @@ We used [Azure](https://azure.microsoft.com/en-us/products/virtual-machines/) to

- run command:
```
"AltTester(R) Desktop.exe" -batchmode -port 13000 -license <your_license_key> -nographics -logfile LOGFILE.txt
AltTesterDesktop.exe -batchmode -port 13000 -license <your_license_key> -nographics -logfile LOGFILE.txt
```

We have now a VM where AltTester® Server is listening for connections. Further on we will use the IP of this machine to have the communication between the main actors.
Expand Down

0 comments on commit c0d2b5f

Please sign in to comment.