Unable to run the test parallelly on 2 devices through testng (appium java) > code runs individually << failed due to unable to locate the element
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- mobile-dev, testing-qa
Hướng nghiên cứu
Bắt đầu với TestNG XML và tests.Muti_LoginTC2, sau đó kiểm tra Base2.startServer cùng các điểm vào của SplashPage, GetVerificationCodePage và OTPVerificationPage. Tái hiện login1 và login2 song song trên hai thiết bị được liệt kê và ghi lại lần tìm phần tử bị lỗi; được xem là hoàn tất khi cả hai luồng đều tìm thấy các phần tử của mình và hoàn thành mà không can thiệp lẫn nhau.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
testng XML :
Test :
package tests;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
import org.testng.Assert;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
//import Practice.BluesecureTC.Base1;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import pages.GetVerificationCodePage;
import pages.InviteUserPage;
import pages.OTPVerificationPage;
import pages.SplashPage;
import utils.Base;
import utils.Base2;
public class Muti_LoginTC2 extends Base2{
@BeforeTest()
public void killAllnodes() throws IOException, InterruptedException {
Runtime.getRuntime().exec("taskkill /F /IM node.exe");
Thread.sleep(3000);
}
// @AfterTest
// public void stop()
// {
// stop_service();
// }
//
@Test
public void login1() throws IOException, InterruptedException
{
AndroidDriver<AndroidElement> driver1 = startServer("8244","Bluesecure","RZ8R915W2KW");
driver1.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
System.out.println("Thread one is" +Thread.currentThread().getId());
SplashPage s1=new SplashPage(driver1);
GetVerificationCodePage verify = new GetVerificationCodePage(driver1);
OTPVerificationPage otp = new OTPVerificationPage(driver1);
s1.naviagte();
// String expected="android.widget.ScrollView";
// String actual =
verify.allow_permissions();
verify.login("8755875532");
otp.verifyOtp();
}
@Test
public void login2() throws IOException, InterruptedException
{
AndroidDriver<AndroidElement> driver2 = startServer("8241","Bluesecure","HA4L6TGQGET4CMDI");
//AndroidDriver<AndroidElement> driver = capabilities("Bluesecure");
driver2.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
System.out.println("Thread two is" +Thread.currentThread().getId());
SplashPage s2=new SplashPage(driver2);
GetVerificationCodePage verify2 = new GetVerificationCodePage(driver2);
OTPVerificationPage otp2 = new OTPVerificationPage(driver2);
s2.naviagte();
// String expected="android.widget.ScrollView";
// String actual =
verify2.allow_permissions();
verify2.login("9544696100");
otp2.verifyOtp();
//
}
// @Test
// public void login3() throws IOException, InterruptedException
// {
// AndroidDriver driver = startServer("8997","Bluesecure","RZ8R915W2KW");
// //AndroidDriver driver = capabilities("Bluesecure");
// driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
//
//
// SplashPage s1=new SplashPage(driver);
//
// GetVerificationCodePage verify = new GetVerificationCodePage(driver);
// OTPVerificationPage otp = new OTPVerificationPage(driver);
//
// s1.naviagte();
//// String expected="android.widget.ScrollView";
//// String actual =
//
// verify.allow_permissions();
// verify.login("9544696100");
// otp.verifyOtp();
////
// }
}
- Ngôn ngữ chính
- Java
- Star
- 1.3k
- Fork
- 755
- Merge trung bình
- 5 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của appium/java-client
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
appium/java-client#2426 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
appium/java-client#2372 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
appium/java-client#2368 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 30/100
appium/java-client#2341 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
appium/java-client#2323 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của appium/java-client
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenAPITools/openapi-generator#25014 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
AloisSeckar/demos-java#380 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
openhab/openhab-core#5847 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
appsmithorg/appsmith#42297 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100