The most humble and most patient interviewer i would say i have seen. And the best part is you give the answers and solutions right away which makes the video more interacting and useful.
Regarding 'new' keyword. It basically calls the constructor of that class and then it's constructor's job to create the instance and allocate memory to that object
I think we can use parameters. Such as depends on and also we can give priority for that test case 2 as 0 and test case 1 as as 1 ==> so that we can achieve test 2 execute first and then test 1 execute
Thank you so much its really useful i literally enjoyed all your mock interview video most humble and most patient interviewer, i wish your channel would grow and reach new milestone in the days to come ❤❤❤❤❤❤
We use for dependsOnMethods because testNG support dependency of one test method over other method, @Test(dependsOnMethods="Test2") Public void Test1(){ System.out.println("Home page test"); } @Test Public void Test2(){ System.out.println("login test") }
About test NG, We need to use the @parameter annotation and by using this annotation we can disable and enable the test cases. Disable =true, Disable=false. Or We can use the run option inside the class
We have to execute only particular test case the we can disable other test case by using keyword enable=false and other methods also there we can use xml file and in that file we can use include or exclude tag
Hi, I want your advice I have 8 years of gap in my career. Earlier than that I had worked ad database developer where I extensively works on query writing. Now since 2 years I am learning automation testing. During First year I learnd automation testing using python and now I learned selenium with Java. I also try to learn BDD framework, GitHub, maven and basics of Jenkins like how to schedule a Jenkins job and the stages in jenkins. … so my question is like do companies consider women employees with 8 years of gap. Reason of my gap is I had moved to USA and had no working Visa. Right now I am in Canada. I am not getting any interview call. Please help
package Program_testng; import org.testng.annotations.Test; public class sample { @Test(dependsOnMethods="test2") public void test1() { System.out.println("test1"); } @Test public void test2() { System.out.println("test2"); } } this will be better approach ?
@Test public void login() { System.out.println("Login");
}
@Test(dependsOnMethods = "login") public void searchUser() { System.out.println("Search User"); } in this we can make one test depend over another test .Here if login method is get exicute then only the searchUser method will excute otherwise it will get fail
ua-cam.com/play/PLTGn8a4YcF3wp7Jb7VKtkYLiIpvyL0pl7.html
QA Success Stories
The most humble and most patient interviewer i would say i have seen. And the best part is you give the answers and solutions right away which makes the video more interacting and useful.
Thanks for watching!
I have seen many of your video and those are helpful.
You make candidate more comfortable and easy to answer or express knowledge.
The Feedback or comments which you gave to Ankitha is a really good booster to me as well ("Support yourself")👍
Thanks Pooja for watching!
Sir Your videos are helping people a lot who want to make their career in software testing field,
You are really a great man Rakesh !!
Doing a great job to improving your community skills
Thanks 🙏🙇
Regarding 'new' keyword. It basically calls the constructor of that class and then it's constructor's job to create the instance and allocate memory to that object
Wonderful answer Ramneek!
@@rdautomationlearning609 new is a keyword is java which is used to create an object in heap area and assign one address to the object.
New keyword is used to allocate the memory.
I think we can use parameters.
Such as depends on and also we can give priority for that test case 2 as 0 and test case 1 as as 1 ==> so that we can achieve test 2 execute first and then test 1 execute
Thank you so much its really useful i literally enjoyed all your mock interview video most humble and most patient interviewer, i wish your channel would grow and reach new milestone in the days to come ❤❤❤❤❤❤
There are two scenarios
If there are only two methods,
a. we can use the dependsOn parameters
b. also set priorities for the test cases
If we assign Priority to test cases according priority test case wil execute,if test2 failed than test1 must be skipped, it won't happen in priority
As he telling dependency
We use for dependsOnMethods because testNG support dependency of one test method over other method,
@Test(dependsOnMethods="Test2")
Public void Test1(){
System.out.println("Home page test");
}
@Test
Public void Test2(){
System.out.println("login test")
}
Test 1 (priority =2)
Test 2 (priority =1)
Thanks for the response!
Using priority keyword
Test 1 (priority =2)
Test 2 (priority =1)
we set the priority keyword means we set the first test case as a priority 1 and then second test case we set the priority 2
About test NG,
We need to use the @parameter annotation and by using this annotation we can disable and enable the test cases. Disable =true,
Disable=false.
Or
We can use the run option inside the class
in test case 1,
use dependsOnMethds=method name(of test case2)
it means when test case2 execute then test case 1 will also execute.
We have to execute only particular test case the we can disable other test case by using keyword enable=false and other methods also there we can use xml file and in that file we can use include or exclude tag
We can handle three ways
1.@AfterMethod annotations in Test1
2. @BeforeMethod annotations in Test2
3. @Test(dependsOnMethods={"Test1"}) in Test2
Correct!!
Test1,Test2-set the priority=0 is Test2 ,Test1is set priority=1
Using 'dependsOnMethod' attribute within @Test annotation, we can specify the name of the parent test method on which the test should be dependent.
Suggestions you gave are really helpful..... Thank u
Thanks for watching.
class stringNum {
public static void main(String[] args)
{
String str = "test234";
char ch[] = str.toCharArray();
String dig = "";
for(int i=0; i
Can achieve 1.method changing
2.@dependson assertion
3. Priority of test case
For the card payment scenario, two of the most important scenarios would be Payment Success and Payment Failure.
You are great sir, learned a lot from you
Glad to hear that
Syntax is not correct but using dependsonmethod we can execute test2 before test1 , second way is by giving priority for methods
we can use depend on and priority features
We can use priority one for test1 and give priority test2.
Or we can use before for test1 and after for test2
Id and Name as a locator must be referred as the first choice in the case of most web apps.
We use dependonmethod =test 2 keywords to test 1 then if test 2 will execute then test 1 will run otherwise it will skip not fail
Because M2 method may have first priority that's why M2 method executed first instead of M1 method
Sir actually we can use annotations like test1= we write @test (priority1)
Then we get only test1
@Test ( Priority = 1)
Great interview, sir. This required
Sir Your are genius,.
Thanks Mahesh we all are genius 😊
We can go for priority to execute test 2 1st
I will give the priority's to test cases
Thank you sir you are such a great motivator...
Thanks for watching!
Really helpful 😍, thanks both of u
Most welcome 😊
It really helps ...thank you so muchhhhhhhh 🥰
Thanks for watching.
Answer to the open question..
@Test(dependsOnMethods="Test2")
Public void Test1()
{
}
wow sir what an interview, thanks
We can use priority
We can use priority concept
Replace all we can use to remove sting and keep only integers.
You can give like this,
@Test1(dependsOnMethods="Test2"}.
Could you please suggest how we can arrange the array code in Java
Like int[] num ={0,1,0,1,1,0}
Output like {1,1,1,0,0,0} how?
what time comp or space comp solution you are looking for?
@@koushikkgs7495 yes both
Use descending order
First sort arrays then use for loop with decreasing order
Arrays.sort method
After that use for loop
We will use dependson method parameter to excute second method
By giving priority to the test method you can execute the test as you want
Using priority or order attributes
We have to use dependsOnMethod
I would use to dependsonmethod=casename,
Priority for case
depends on method("method name")
We can add these 2 test cases in one group.
Good work ankita👍
Thanks Madhvi for watching!
Hi, I want your advice I have 8 years of gap in my career. Earlier than that I had worked ad database developer where I extensively works on query writing. Now since 2 years I am learning automation testing. During First year I learnd automation testing using python and now I learned selenium with Java. I also try to learn BDD framework, GitHub, maven and basics of Jenkins like how to schedule a Jenkins job and the stages in jenkins. … so my question is like do companies consider women employees with 8 years of gap. Reason of my gap is I had moved to USA and had no working Visa. Right now I am in Canada. I am not getting any interview call. Please help
Depends on method method name
Sir pls confirm these questions asked by mpahsis company.
I also want to give interview. Can you please take my interview
Please share your CV at rdautomationlearning@gmail.com
By using Dependency annotation.
Depends on method
Depends on method =method name
I want to give a mock interview
Where I can share my resume?
Please share your CV at rdautomationlearning@gmail.com
@@rdautomationlearning609 Done
DependsOnMethods={"method name"}
I want to give interview..
How to give..
Please share your CV at rdautomationlearning@gmail.com
Sir I want to join mock how is it possible
Hello sir
I have 4 year's of experience so please u can take my mock interview also
Alwaysrun annotations to run second test
We will declare dependOn annotation with priority
Priority basis
Parallel execution
DependsOnMethod
@Test(priority = 1)
Dependaonmethod in test annotation
Test 1(enable=false)
Could you please take my interview
sir I also give the interview
@Test(dependsOnMethod=test2)
Public void test1() {}
Always be run
Used hard asser
package Program_testng;
import org.testng.annotations.Test;
public class sample {
@Test(dependsOnMethods="test2")
public void test1() {
System.out.println("test1");
}
@Test
public void test2() {
System.out.println("test2");
} }
this will be better approach ?
dependsOn
@Test
public void login() {
System.out.println("Login");
}
@Test(dependsOnMethods = "login")
public void searchUser() {
System.out.println("Search User");
}
in this we can make one test depend over another test .Here if login method is get exicute then only the searchUser method will excute otherwise it will get fail
Sir I too want to give mock interview please give email id to send the cv
Please share your CV at rdautomationlearning@gmail.com
Sir can u share ur mail id
We can go for priority to execute test 2 1st