I had given a lot of thought for building test cases for the FB app .
Major areas for testing were -
a) New user registration
b) Permission acceptance flow
c) Other features of the app. but most of which should be manually tested.
Enter, Selenium . It simple automate browsers. Its really simple . I did the following
1) Fired firefox. Added Selenium IDE Plugin . It basically records user actions , initially in HTML which later can be exported to python or other supporting laguage.
2) After step 1, half work is already done :)
3) Now on to FB part. Here I was trying to automate New User Registration Flow. Here I needed a new test user everytime I run the script.
Enter , Facebook's Test User Api.
a) First get App Access Token
b) Then get a new test user credentials
4) Now include this flow in your test case, Call the script to get test user credentials, and login and go to app, and viola, Test Case Completed.
5) There is one small thing though, :) , the python exported test case gave error on the action when it tries to select frame of the app. Here we can use switch_to_frame method.
Rest all was a piece of Cake.
//Edit - Not exactly piece of cake, cause the test cases are performing a bit weird. :)
Major areas for testing were -
a) New user registration
b) Permission acceptance flow
c) Other features of the app. but most of which should be manually tested.
Enter, Selenium . It simple automate browsers. Its really simple . I did the following
1) Fired firefox. Added Selenium IDE Plugin . It basically records user actions , initially in HTML which later can be exported to python or other supporting laguage.
2) After step 1, half work is already done :)
3) Now on to FB part. Here I was trying to automate New User Registration Flow. Here I needed a new test user everytime I run the script.
Enter , Facebook's Test User Api.
a) First get App Access Token
b) Then get a new test user credentials
4) Now include this flow in your test case, Call the script to get test user credentials, and login and go to app, and viola, Test Case Completed.
5) There is one small thing though, :) , the python exported test case gave error on the action when it tries to select frame of the app. Here we can use switch_to_frame method.
Rest all was a piece of Cake.
//Edit - Not exactly piece of cake, cause the test cases are performing a bit weird. :)
No comments:
Post a Comment