What is the industry standard for automating test cases? [closed] - selenium

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I am new to currently working project. They have 220 test cases to automate.
They are following the below procedure:
Assume that it has 5 features. Edit Mobile number, edit email address, edit alert, close alert, search transaction.
Login the app
Do all the above mentioned functionality
Logout
Maximum functionality at one test case. But cannot derive what exactly failed but taking less time.
But what we have followed earlier:
Login app
Edit Mobile number
Logout
Next test case:.
1. Login app
2. Edit e-mail
3. Logout. Etc. All are independent test cases but execution is time taking
Which is the industry standards? We are in the Same org but following two different approach. What is industry standard??

There is No Industry standard.
Just make sure no test case should be dependent on other test cases. Note that TestNG dependency differs. Just for scenario :
#Test
public void testEditNumber(){
//should have edit number functionality
}
#Test
public void testEmailEdit(){
// should be independent of **testEdiitNumber**
}
You have mentioned "cannot derive what exactly failed but taking less time".
If you put all the functionality in one method , it's quite obvious that It will be hard to debug and if we will talk about time, there's a hardly difference.
Suggestion :
Keep all the test method independent.
You can stick with what you were doing previously.

Related

How to decide which type of testing(Manual or automation) required when we get new web application? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
How to decide which type of testing(Manual or automation) required for a project or application to test?
What are the parameters we have to consider to select which type of testing(Manual or automation) to test very new application?
It depends on :-
Size of the project- If the project is large and consist of so many functionalities then automation testing is suggested
How many times you want to test a particular feature- If the requirement is to test regularly then automation test is best
Font size and image- This can not be tested through any automation tool so to test this, one should need to do manual testing
To find bugs- If one needs to find a lot of bugs, Manual testing is suggested.
You shouldn't have to choose between automation testing and manual testing the way you're asking. The way you're asking it gives me the feeling that the product is already waiting to be tested. In this case you would need to resort to manual testing.
Ideally you would want to have both and even more of automation. Some of the questions that you need to ask are:
Is this a new project or an existing one? If it's a new project then it's easier to plan for automation from the start. You could start implementing automation tests from the start. If it's an existing project then you'll need time to set up automation + write scripts etc. Then you have to resort to manual testing initially.
Is there any existing team? If yes, then what are they doing. You need to continue the process instead of suddenly disrupting it for anyone.
How much resources (money+people) do you have? Do you have manual testing resources? Are they busy or do they have bandwidth? How many automation test resources do you have?
What kind of project is it? Who does it go to? Does it have human lives depending upon it? Does it need a legal certificate of some kind for being tested?
There's just too many questions based on how your question is currently stated. I hope that this answers your question when we consider it generally. But if you're looking for a particular answer then please consider adding more context.

Custom non-trivial test fixture -- Do we create user stories for it? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
A rather complicated library/subsystem has to be integration tested and smoke tested, and for that purpose we need to develop a non-trivial test fixture/runner.
The details are not important, but assume that the test fixture we need will be generating complicated, interacting, state-dependent input test vectors, and will be looking for complex result sequences.
The test fixture itself will require some significant development effort (though less effort than the subsystem itself). The question is:
Should this non-trivial test fixture be included in the project plan as a part of the iterations?
Should a set of user stories be created for this test fixture?
If so, how would the user stories be structured? And who would be the actors here: the test engineer running the tests, the subsystem, or the fixture itself?
If your 'non-trivial test fixture/runner' is estimated to take more than a day to be implemented, it's work that should be tracked proper and should go into your backlog.
If you think it may take a week or longer, then I'd do a prototype first.
Probably the 'non-trivial test fixture/runner' doesn't bring any business value itself. I'd assume you're addressing technical dept. Writing user stories for technical tasks/ dept feels always wrong to me. Put them as technical tasks in your backlog.
You should know your business and your actors.

How to program Selenium to bypass Login page? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I have written 3 Selenium WebDriver 2 tests using Python. All of them log in first and then check functionality further down the application. How could I bypass the login page and go directly to a page?
Thanks.
It depends on the application. If it does not allow an unauthorized access to a page, then you have to login.
However, you could possibly pass the authorization once and then access various pages within one session. Just remove steps implying logging out or closing the browser.
If you are using TestNG or JUnit, you can place the authorization to #BeforeClass or other #Before* method. Which one are you using?
UPD:
In case you are using Python+unittest, put authorization actions to the setUpClass() or startTestRun() method, whichever suits better.
You want to find a way for a client (selenium test) to bypass the login required by the server?
If it is possible, your security is a big failure.
Selenium has a simple purpose: make a real functionnal test.
If the use must login to do something, test it correctly. So login.

testing content of a webpage [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am new to software testing and was wondering which is the correct way to test content of a web page. For ex. on a web page if there are 10 labels then should I test first header "Selenium Training and Video Tutorials" and then second details given below the header then further details in this way and create separate test step for testing different text? Or I can use div tag which will give me the complete content of the page at once and test everything in one step. I can do it in one step or divide into steps but I want to do it in a correct way. I am using selenium webdriver (java).
Adding to the arran answer, it is better to split the 10 labels into 10 assert statements so that you can easily know which one went wrong, and also use TestNG or Junit for assertions. Since you are new, there are methods in TestNG like
assertEquals(char actual, char expected);
So in your code, it might look like
header1="programatically get the value using selenium"
assertEquals("Selenium Training and Video Tutorials", header1)
Testng also gives you clear report too.
Writing separate tests for each label as described by you will be a great option for :
increasing understandability
tracking down any errors
fixing of the script (if required in future)

How to create test data for automating acceptance test? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I'm working on a legacy banking web application which uses oracle database with lots of stored procedures.
I have to write automated acceptance test suite for this application.
Most of the acceptance tests requires a customer information to be entered in the system, which then perform some business rules and changes the customer's credit ratings.
The problem is that the information that is entered goes into the database which fires a sequence of stored procedures.
I want to know how to go about creating the test data for this application for my automation suite to run?
At this moment I have a few things in my mind:
To create a separate database sandbox to run my acceptance test, but I'm worried that because of the stored procedures, would the replication be possible?
Identify the tables and mock the dao's to return the test data which calls these tables?
As this seems to be a common scenario's for applications which need their acceptance test to be automated, I would like to know what approach is followed in projects which have similar cases.
The tech stack of web application is:
Spring 3.1, Hibernate and Java 6
You absolutely MUST create a separate database sandbox. It's the only way to be sure of the state of your application when you're testing it. The creation of this sandbox DB should be part of your build process and should be fully scripted.
Have a look here for a more in-depth guide http://thedailywtf.com/Articles/Database-Changes-Done-Right.aspx