Testing streaming service (like selenium) [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 2 years ago.
Improve this question
Good afternoon.
I'm testing my company's streaming service, which works like twitch.
The task is as follows:
Log in to your account and simulate viewing the stream ( and chat)
I was thinking of writing code in selenium. But as far as I understand, in this case you will have to use your own driver for each thread. I'm afraid it will take up too much memory.
Now the question.
It's true? Is there a way to avoid this?
What methods would you recommend to solve this problem?
I just came up with the idea to try not drawing videos to save resources. But there is one caveat here, so that the streaming service doesn't think I'm a bot.
In other words, I have to constantly get it, but not draw it.
This won't work with selenium.
The question is as follows: is it possible
to send login data to the form and "view" the stream programmatically in Java?
Which libraries should I use?
Can you recommend the necessary libraries with links to the functionality I need?

You can use a service for cloud-hosted testing for this, you will not have to care about the testing infrastructure then. Some services allow you to use Selenium in the test scripts, so test creation will be similar to a local testing experience.
Here is a link to a service that will allow you to achieve what you need and you can run some tests for free there.
Also here is a step-by-step guide to create and set your test.

The easiest way to achieve this would be to use Selenium Grid with TestNg.
As long as you need to validate the front end, selenium is the tool, if not 100%, you can simple test using API calls:
Log in via API calls
Perform a get on desired page and use a html parser to make some validations regarding the front end call
API calls to check the chat

Related

GraphQL API - any automation tool for testing it? [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 3 years ago.
Improve this question
I want to test a GraphQL API.
For now, I'm using GraphiQL, but I'm looking for any automated tool...
It seems that SOAPUI does not support GraphQL testing.
Any ideas?
Thanks.
You basically have a few options that I've seen:
Apollo's GraphQL Platform. It gives you full-blown telemetry on your individual resolvers, and can integrate with VS Code to let your developers know how expensive their query is in real time. You'll pay for it though.
An observation tool such as HoneyComb or DataDog, also paid.
Write your own. For a simple enough use-case it may make sense, but if you're looking for a rich feature set it probably makes more sense to buy rather than to build.
I am using SoapUI 5.4.0 (community edition) and have no trouble testing GraphQL requests.
Treat them as a Rest request and add a header, e.g. Content-Type: application/graphql
see image for all details.
What, specifically, do you want to test?
We have a number of automated sanity-check tests that we run on every build:
Is the schema valid (according to graphql-js)? This can be surprisingly easy to mess up if your implementation allows for e.g. multiple definitions of the same type name, or any other number of subtle bugs.
Is this a breaking schema change? If so, break the build unless there's a specific git commit message acknowledging and accepting it. With graphql-js this is fairly easy - run the introspection query against current production, run it against the current build, and use the built in findBreakingChanges function.
Note that the graphql-js tests don't mean your server has to be written in JS - ours is written in ReasonML using ocaml-graphql-server, and then on build we use a node test suite to hit it as any other client would.
Finally, beyond that, we have some tests that run queries/mutations for an end-to-end API server test. Overall, this has been quite robust against regressions so far.
And keep in mind that you can simply hit your GraphQL server with any http client, there doesn't have to be GraphQL-awareness in your test suite. I'd recommend this route on top of the sanity checks I mentioned above.
For automated testing there is https://github.com/ohler55/graphql-test-tool/gtt. It's written in go but as a standalone application it can be used with any GraphQL server. We use it for unit testing and CI.
Karate is the only open-source tool to combine API test-automation, mocks and performance-testing into a single, unified framework.
https://github.com/intuit/karate

Server & API load 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 5 years ago.
Improve this question
I have custom API included in a website which creates new UID on new unique user visit like Google Analytics and sends the UID data to the backend server(NodeJs) for computation.
I need to check concurrent users and max the limit of users can be created/handled per current cloud config.
Also, need to check, is there any limit on API creating and sending users data. The API is on CDN(fastly)
Please suggest some testing tools, to check for above scenario.
SoapUI is a kind of standard for web services functional testing, it has also certain load testing capabilities
Web Services are basically JSON or SOAP over HTTP so any tool which supports HTTP protocol will suit. Here you can find the list of free and open source load testing tools. Narrowed down to the most powerful ones it will look like:
Grinder
Gatling
Apache JMeter
Tsung
Check out Open Source Load Testing Tools: Which One Should You Use? article for the main features comparison, sample scripts and reports.
I agree with Dmitry that those four (Grinder/Gatling/Tsung/Jmeter) are good tools, with a lot of functionality, but they are also fairly complex, require dependencies and can be somewhat painful to get started with. It all depends on your requirements which tool is best for you.
It sounds to me like you want to test one or two REST API end points powered by NodeJS. If you want a simple-to-get-started with tool that can be scripted, there are some good command-line tools available:
Wrk - very fast, scriptable in Lua
Artillery - NodeJS-based, scriptable in JS
k6 - our own newly released tool, currently the fastest tool scriptable in JS
There is also Locust which is scriptable in Python, but very low-performing.
I like these tools because they offer simple command-line usage and can be scripted in a real language, as opposed to Jmeter and Tsung, where you'll have to resort to XML if you want to do something slightly out of the ordinary. Gatling is a bit better, offering a DSL based on Scala classes where you can do most things but it is still not "real" Scala. The Grinder is the only one of those other tools that offers true scripting (in Jython), but again, it is not a simple one-line command to get started.

How detailed should my manual test case be? [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 6 years ago.
Improve this question
I'm testing a business app and my boss insists that my test cases are too detailed and bring no value to the company. For UI and functionality testing I was just testing every text box, menu, etc., and making a proper test case in MTM.
How much detail should I include in test cases? How detailed should they be?
It's hard to suggest something without seeing what you've got and what's being criticized.
Just a tiny idea on how to make your test-cases more general: try to make use of some kind of repositories.
These can be UserRepository (having GoodUser, BadUser; GoodUser.Admin, GoodUser.Customer, etc).
Such strategies are applied in automation testing.
This way, instead of having
1. Enter "Login1" into 'login field';
2. Enter "Password1" into 'password field';
3. Press 'Sign in' button...
You'll simply have
1. Sign in as GoodUser.Customer;
And if you have some other field added to the login process later, you won't bother editing dozens of test-cases.
Good luck!
You have to write test cases in proper formation. If application is big and you are testing first time then you have to create test cases for every fields and every menus.
If you have knowledge about the application functionalities and you have also worked on it then create test cases for functionalities and include validations.
I hope this is helpful for you.
It is very easy just follow my points:
1) Just understand that app.
2) Just understand that app functionality.
3) Note important points in that app.or note that app full functionality line by line in a paper.
4) Now Start write test cases by the functionality.
5) Your are testing business app so it is related to server side also.
6) Write some test cases server side also.
7) Write test cases clearly and step by step.Because in testing every point is important to the developers.
I hope this is helpful for you.
If you are new tester then try to understand the application first then ask for requirements and according to your requirement you can write test cases.
100% testing for any application is not possible,try to complete all functionality as well as write Bug sheet,which helps to improve application UI and functionality.
Don't add redundant test cases for menus,text-box,buttons etc.
I hope this is helpful for you.
In an application you can write a single test case for an action and records your results
EX:
For login page you can write a single case with and provide different input while doing your validation for all fields and record the results based on your requirement.

How to perform load testing using Selenium WebDriver? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have to perform the load testing the application using Selenium WebDriver for 100 users. 100 users login and hit the server at a time.
How to do this process using Selenium WebDriver?
UPDATE As mentioned in the comments, this is a bad idea. If you are considering Load Testing with Selenium Grid, reconsider your purpose and verify whether Selenium Grid really is the only option you have.
For a free solution:
Selenium provides an easily scalable testing framework called Selenium Grid. You can use this in conjunction with TestNG to create a scalable load-testing framework.
From the link:
scale by distributing tests on several machines ( parallel execution )
manage multiple environments from a central point, making it easy to run the tests against a vast combination of browsers / OS.
minimize the maintenance time for the grid by allowing you to implement custom hooks to leverage virtual infrastructure for instance.
I have leveraged Selenium Grid to load-test our web-app with about a dozen concurrent browser sessions (so far). I used several references to achieve this:
http://testng.org/doc/documentation-main.html#parallel-tests
http://blog.wedoqa.com/2013/07/how-to-run-parallel-tests-with-selenium-webdriver-and-testng-2/
http://www.mkyong.com/unittest/testng-selenium-load-testing-example/
Though it's not completely clear of what type of performance testing you are looking for
Selenium Webdriver is mainly meant for testing frontend functional cases and not meant for cranking up the front end with load testing.
So as I see it you might be looking for either one of these
JMeter
The API or the backend's performance testing for eg: the Login API looking for a free tool I would suggest Jmeter Hands down:
http://jmeter.apache.org/
JSP PAGES PEFORMANCE(WHITE BOX)
Frontend page rending or response times like a jsp page for this there seem to be many techniques but most point to white box testing such as this.
http://www.javaperformancetuning.com/tips/j2ee_srvlt.shtml#REF12
Hope it helps.

How should we automate system testing? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
We are building a large CRM system based on the SalesForce.com cloud. I am trying to put together a test plan for the system but I am unsure how to create system-wide tests. I want to use some behaviour-driven testing techniques for this, but I am not sure how I should apply them to the platform.
For the custom parts we will build in the system I plan to approach this with either Cucumber of SpecFlow driving Selenium actions on the UI. But for the SalesForce UI Customisations, I am not sure how deep to go in testing. Customisations such as Workflows and Validation Rules can encapsulate a lot of complex logic that I feel should be tested.
Writing Selenium tests for this out-of-box functionality in SalesForce seems overly burdensome for the value. Can you share your experiences on System testing with the SalesForce.com platform and how should we approach this?
That is the problem with detailed test plan up front. You trying to guess what kind of errors, how many, and in what areas you will get. This may be tricky.
Maybe you should have overall Master Test Plan specifying only test strategy, main tool set, risks, relative amount of how much testing you want to put in given areas (based on risk).
Then when you starting to work on given functionality or iteration (I hope you are doing this in iterations not waterfall), you prepare detailed test plan for this set of work. You adjust your tools/estimates/test coverage based on experiences from previous parts.
This way you can say at the beginning what is your general approach and priorities, but you let yourself adapt later as project progresses.
Question about how much testing you need to put into testing COTS is the same as with any software: you need to evaluate the risk.
If your software need to be
Validated because of external
regulations (FDA,DoD..)
you will need to go deep with your
tests, almost test entire app. One
problem here may be ensuring
external regulator, that tools you
used for validation are validated
(and that is a troublesome).
If your application is
mission-critical for your company,
than you still need to do a lot of
testing based on extensive risk
analysis.
If your application is not concerned
with all above, you can go with
lighter testing. Probably you can
skip functionality that was tested
by platform manufacturer, and focus
on your customisations. On the other
hand I would still write tests (at
least happy paths) for
workflows you will be using in your
business processes.
When we started learning Selenium testing in 2008 we created Recruiting application from SalesForce handbook and created a suite of tests and described our path step by step in our blog. It may help you get started if you decide to write Selenium code to test your app.
I believe the problem with SalesForce is you have Unit and UI testing, but no Service-level testing. The SpecFlow I've seen which drives Selenium UI is brittle and doesn't encapsulate what I'm after in engineering a service-level test solution:
( When I navigate to "/Selenium-Testing-Cookbook-Gundecha-Unmesh/dp/1849515743"
And I click the 'buy now' button
And then I click the 'proceed to checkout' button)
That is not the spirit or intent of Specflow.
Given I have not selected a product
When I select Proceed to Checkout
Then ensure I am presented with a message
In order to test that with selenium, you essentially have to translate that to clicks and typing, whereas in the .NET realm, you can instantiate objects, etc., in the middle-tier, and perform hundreds of instances and derivations against the same BACKGROUND (mock setup).
I'm told that you can expose SF through an API at some security risk. I'd love to find more about THAT.