Best method to store test data in TestNg framework - selenium

I am using a hybrid automation framework using TestNg. Our product is an AI application. Mainly we will verify the Questions and answers.
As part of automation, we need to ask some set of questions and assert the answers. we have to maintain these questions at the module level.
Questions count: each module has around 10 questions. Total 8 modules.
I am looking for the best approach to use the test data in the framework.

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.

What will be the best tool to automate a Single Page Application test cases [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 11 months ago.
Improve this question
I have a new website to test which is a Single page application (SPA) and I'm not sure which tool shall I use to automate it. I thought of Selenium and Protractor but Protractor would not be a good idea as my site has nothing to do with AngularJS and in that case is it like Selenium WebDriver is the only option or there are any other tool available in market?
If selenium is the only good option then what sort of challenge I can face?
I'd go for Watir-Webdriver and Ruby! Main benefits - easy to read and understand code, ruby flexibility, power and irb debugger, speed and reliability. As for challenges - one would be of integrating technologies (if your site uses C# as the backend - i would definitely go with C# and Selenium-Webdriver)
Yes you can go with selenium webdriver with a framework like POM(Page object Model).
Page object model gives flexibility and maintainability for you scripts.
Refer:-
http://toolsqa.com/selenium-webdriver/page-object-model/
Hope it will help you :)
In case of one page application its will be bad idea to use selenium.
add all the dll's to your project, run the webDriver in your code and so on ...
The best idea will be using (.Net webBrowser + MSHtml) [in case that your test will be on internet explorer web browser]
The Benefits:
Speed !
Build in Framework.

Test result reporting [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am using TestNG and Selenium webdriver via Java.
Is there any tool that can help generate detailed test results, for example, suppose I have a test case that fails more often than not, is there a tool that can statistically report those test cases that fail more often than the others like in a graph, or pie chart, etc?
XL Testview
Have a look at XL Testview from XebiaLabs.
Test analytics and decision support that spans testing tools
See all your test results in one single dashboard
Analyze test results across multiple test tools
Track release metrics and quality trends over time
Use real-time quality data to make the best go/no-go release decisions
I havent used it, but seems to track results over time. Seems pretty interesting.
Test Result Analyzer
Or have a look a the Test Result Analyzer plugin for Jenkins.
Many of us have a requirement of knowing the execution status of a
test package , test class or test-method across multiple builds. This
plugin is an implementation of the said requirement and shows a table
containing the executions status of a package,class or a test-method
across builds.
This plugin supports jUnit and TestNG results sets. Looks like the minimum you want and it is free. :)
Tesults - it handles all this including identifying recurring / continuing fails. In general it's a great central place for a team to view and assign failing tests. Please be aware that I work at Tesults.

What is the most appropriate GUI Testing Tool for MS Dynamix CRM hybrid application? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have been recently assigned as a tester on a web app that integrates with Microsoft Dynamix CRM.
There are a lot of repetitive testing tasks that could be automated to accelarate the testing effort.
I proposed this to my boss and said that I can start hacking together some watir scripts. However, he wants me to do more research (he is happy to invest the cash if there is something out there that can save us time - he is heavily attached to the idea of there being some kind of record and playback tool out there that cranks out robust scripts but I am not convinced).
This is my tool experience so far:
webdriver (Python)
watir-webdriver (just a dabble for an interview)
TestComplete (small suite of tests for a webapp in 2011)
QTP (in 2009)
Can someone please recommend some tools for me? I don't really know where to start.
It sounds like
Selenium / Webdriver is widely used, widely supported and a good price (free :) )
"Telerik TestStudio" is quite popular but seems like overkill for what I want to do
"QTP" is unreliable and overpriced.
"TestComplete" has some scattered support.
Since I'm already handy with Ruby, I am leaning towards running with the Watir option. Does this seem like a reasonable course?
I would suggest to go with the Open Source solutions: either Watir or Selenium. Both should work, then it depends on your liking. Personally I use Robot Framework with its selenium Library and it works very well and has quite a dynamic community.
Note that you should also consider if you can do part of your testing bellow the UI. You could probably do some tests on the API offered by Dynamix and used by your web app. That would be quicker and more robust.
I would recommend selenium-webdriver. As you said it's widely used, widely supported and good price (free). As you aleady know Ruby you can write tests on ruby using selenium-webdriver.

Cucumber and JUnit Testing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
We are building a new application and we are considering what testing frameworks to use. There are two types of testing we want to do:
Test all the possible logical pathways the execution thread can take (so this is more a technical/developer level testing strategy). We can do this by creating a program to combinatorially generate all the required test data.
Test only the required business use cases for the application (so this is more orientated towards the QAs and BAs).
My thinking is that for (1) we use JUnit and for (2) we use Cucumber. I have no experience in Cucumber. My question is can (1) and (2) be achieved with one framework like Cucumber or is it best practice to separate them out as I describe above.
I'd tend to agree with your assessment that JUnit (or another unit testing framework) is best suited for category 1 while Cucumber is well suited for category 2. Cucumber is a framework for writing natural language (more or less) specifications (in the Gherkin language), and as such its strength really lies in writing executable application specifications.
For purely technical testing, in order to enforce maximum test coverage, you're really only making it more difficult for yourself by writing the tests in a business-level language (Gherkin/Cucumber). Writing the tests with e.g. JUnit will involve much less friction.
For a good understanding of Cucumber and its role in the development chain, in comparison to other (BDD) tools (e.g. RSpec), I'd suggest reading The RSpec Book. In particular, it recommends RSpec, which is more similar to xUnit frameworks, for testing isolated parts of your system, and Cucumber for testing your application as a whole. This book is especially valuable in that it is authored by the creators of said tools (RSpec/Cucumber), so you get to know how these tools are intended to be used.
An example Cucumber specification, the test itself is within the Scenario block:
Feature: Serve coffee
Coffee should not be served until paid for
Coffee should not be served until the button has been pressed
If there is no coffee left then money should be refunded
Scenario: Buy last coffee
Given there are 1 coffees left in the machine
And I have deposited 1$
When I press the coffee button
Then I should be served a coffee