How to automatically detect bugs in a web application? [closed] - unit-testing

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 a web application in Vaadin. It has got some forms, search fields, buttons, etc and supported by a SQL database. I have been using Selenium, Sahi Open Source and some other tools for automated GUI testing.
Problem is: With recording GUI actions for automated testing isn't really useful because it seems more manual work than automated because I need to record the tests manually anyway.
Question is: Is there any better way to test a Web Application? How do you test your web application? Is there any free tool which automatically detects bugs in my web application?

This won't be possible unless someone will invent sentient AI and even that might not be enough. In our company we have separate QA department (they're intelligent human beings) and they keep asking questions like "how we're supposed to test this flow" and "is this the expected response".
Without test that is aware of the business flow that you're limited to what bots do - randomly crawl trough site and try to get "500 page" and that is not enough. If you're tired of writing tests you can:
Use static code analysis tool (like jshint) to check if your code is written in "best practices" way
Use your users as testers (have streamlined release process, and mechanism of reporting error so you can address production bug as quickly as possible)
Hire someone to write the test for you

There are lots of ways to test software. None of them are fully automatic; they all require that actual behavior be compared against expected behavior, and expected behavior cannot be automatically inferred by a machine but must instead be prescribed and defined by humans, and then translated to a language that a machine can understand and use to determine whether it matches the actual behavior.
Here is a starting point to start reading about other ways to test your software:
https://en.wikipedia.org/wiki/Software_testing

Related

advice for naming GCP projects [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 4 years ago.
Improve this question
I am building a mobile dating app and plan to leverage google's cloud infrastructure.
I'm trying to figure out whether the entire application should live in a single GCP project or not.
On reading the best practices documentation I can see they advise the following naming convention:
[company tag]-[group tag]-[system name]-[environment (dev, test, uat, stage, prod)]
So should I split all the core components of the application between different projects? For example one for the data science matching algorithm (fizz-ds-matching-dev) and one for the android application? Or should I jam it all in one project?
Looking to follow best practices...
You're asking for some heat here. What to call things is probably as confrontational as asking vim or emacs!
As an employee of a large company where I oversee like 50 GCP projects my advice would be pick a naming scheme that lets your i-dont-have-time-for-this-kubernetes-gke-yaml-shit developer/pm/boss man find the project they want in 8 key presses or less.
A scheme which has worked well for me is: org-app-environment which is fairly close to what google recommends. I imagine your ops, so dont try to be clever with your naming scheme. Even though your users are dev, they're still users. If it takes them more than 5 seconds to find their project, they will do whatever the equivalent of an Arab spring is in the software world.
You need to find the nirvana of if the new guy is using this, is it easy to filter and find and is it quick to identify wtf is running there.
I recommend org-app-environment. Drop the org if you only have one, otherwise keep it.
Gods speed ops man.

Automated tests in RPA [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 4 years ago.
Improve this question
I'm not very familiar with a concept of testing in programming languages although I know the basic idea and some of the principles to test your code like unit tests and stuff. I haven't written any tests myself yet but the general idea is more or less clear. But when it comes to Robotic Process Automation I get stuck with how I should properly test my workflows.
If I have modules which don't interact with any interface then I can clearly create a test environment, that is a function and this function will pass some arguments and get the result which will be compared to the expected one.
But what are best practices to test the parts of a workflow which interact with interface and contain clicks, type into and all those things?
If anyone has any experience of creating automated tests in RPA, for instance, in UiPath, I would be grateful to see it explained. Any ideas, irrespectively to the proper experience lack or presence, would be highly appreciated anyway.
By the way if anyone worked in UiPath he could notice that they developed the so called ReFramework which follows best practices in RPA deployment according to their words. In this Framework they got a test folder and some test modules but I don't get how they work and how I should adjust them in order to match a program developed by myself.
Thanks for the question.
I am a RPA developer, and also tested the workflows but don't as a "Tester" perspective.
If you look there are many things to test.
case#1
As you said you are dealing with web portal, you might use click activity. There is one property called selector which is auto generated. Selector identify the UI element. There are many attribute in selector that may be static.This is wrong practice
lets take example
Submit
in this idx and uipath_custom_id attribute are a static, this might change accordingly but the name Submit and class never change, So as a tester you can find this type of mistakes by the Developer...
Keep in mind that never give static values or numbers to any attribute in the selectors...Instead of that use
(* and ?)
https://studio.uipath.com/v2017.1/docs/selectors-with-wildcards
It also happen that there are two buttons in web page having same name, same class so the selector which is generated is also some what same except ID so you need to take care of this also as considering ID always changes.
Always keep your workflow small, use proper activity and keep business logic in separate sequence activity Such things you can test. Also you can test the Optimization of the flow.
If you are dealing with other application like Excel or SAP check that you can close it after your work done.
Such things you can test
Thanks
It will be better if you tell the scenario so that community can help you tell about the test cases...:)

How to test a user's code? [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 8 years ago.
Improve this question
My query is very basic one but just want to know the exact things which occur behind the bars and how. Lets say, I am given a question to code. User submits the code in any language(I'd like to go for C or C++ here specifically), now the code gets tested on various test files at the server side. How this happens? As I think and searched, there must be a code at the server side which must be accepting solutions(user's code) from the client in form of the file, then run that file on various test files(which will have all test cases according to the input and output specified in the problem description) and match the output. Is it? I think there is something else or something which I am mistaken.
If I have a very simple program to add two numbers, now I want to test the user's code, what exactly do I have to do? I am asking from the implementation point of view i.e. I want to actually do and test the same on my machine. Can someone please tell me from basic what all I should do?(Much the same way online judges do)
PS: I am not asking this for hosting any contest etc, just doing out of curiosity for learning.
I would divide this into two sub goals
learning automated testing
setting up some application which allows the user to submit testcases, run the automated tests and reports feedback
You could start to get some deeper insight by setting up automated tests for some program in your favourite programming language.
Use a search engine to e.g. look for "automated c++ testing".
If you have managed setting up a few automated tests on a local machine, your could then progress with the second goal.
For example you could set up a Jenkins instance and learn how to add automated tests to it.

Framework/tool for processing C++ unit tests with numerical output [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 am working on a C++ application that uses computer vision techniques to identify various types of objects in a sequence of images. The (1000+) images have been hand-classified, so we have an XML file for each image containing a description of where the objects are actually located in the images.
I would like to know if there is a testing framework that can understand/graph results from tests that are numeric, in this case some measure of the error in the program's classification of the images, rather than just pass/fail style unit tests.
We would like to use something like CDash/CTest for running these automated tests, and viewing over time how improvements to the vision algorithms are causing the images to be more correctly classified.
Does anyone know of a tool/framework that can do this?
I think you should distinguish between Unit testing and algorithm performance (=accuracy and/or speed) evaluation. You should apply both, but separately.
Unit testing should tell you whether your code does what it's supposed to be. Not sure if/how you can unit test the whole chain from a raw image to extracted objects, but you should be able to test the "units" (modules/methods/classes) individually that are combined to do the job. Unit tests should give you "fail" or "pass". If a speed optimization changes the code's behavior, the unit test should tell you this. For unit testing there are plenty of frameworks available (I like Google Test, but there are many others.)
Your question seems to aim more at the second part: evaluate the quality of your algorithm. I personally love TeamCity which is mainly intended as Java/.net Continuous Integration Server, but you can easily use it with C++ too. I wrote a few lines of code in our shop to output Google Test results in a TeamCity format making use of their service API. Each time someone checks in a new revision, TeamCity executes the build (which can be a Visual Studio solution, Ant, command line script or others.) The results are visible to all team mates through a nice web ui. Furthermore, you can report custom build statistics. This can be used for anything like perfomance testing of your algorithms. You simply output a line like
##teamcity[buildStatisticValue key='detectedObjectsPercent' value='88.3']
on the console from your application (which must be configured to run in each build) and TeamCity will store these values and provide a nice graph (values over time) on the web user interface.
Don't forget to setup your custom chart as described here.
I think TeamCity is really simple to setup, so just give it a try! I even like it if I work on a project just by myself!
What you are describing is a typical computer vision/ image processing testing application framework. Although I have designed and used several such systems over the years, they were/are all proprietary.
Such a general purpose testing tool should have variable tolerances, different measures of Type I/II errors and error rates, total summaries and also case-by-case identification of problems. It should also provide different views to different users - for example, while debugging, a programmer needs different data than the release/project manager.
A DB driven back-end and automated test suits enhanced with statistical plots would be great too!
Unfortunately, I do not know of any such testing frameworks available.
I have always had it in my mind to start an open-source project for such a system, but time and resources are scarce, and I was never sure of the actual desirability of such a system (though I am quite sure that it can be made general purpose to suite the needs of many applications).
I would be very interested to know if there is real interest in such a system, it may get the wheels of this project moving...
I think you will have to write your own code at this time.

Is soapUI the best web services testing tool/client/framework? [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 9 years ago.
Improve this question
I have been working on a web services related project for about the last year. Our team found soapUI near the start of our project and we have been mostly(*) satisfied with it (the free version, that is).
My question is: are there other tools/clients/frameworks that you have used/currently use for web services testing and would recommend?
(*) There are some weird GUI glitches that appear once in a while. As is mentioned by some of the answers, we attributed this to a memory leak.
I use soapUI, and it's generally pretty good. Be aware that it seems to leak memory, and eventually it will no longer save your project, so save regularly!
This is about the only hassle I have with it (other than the general ugliness that almost every Java application has!), and I can't live without it.
There's an eclipse plugin that allows you to do web service discovery, testing, etc - see Eclipse Web Services Tools.
I think it's much better than SoapUI, at least on Mac OS X.
Call it laziness but I kind of gave up looking a while after I found SoapUI - its not perfect (what is) but it does its job very well (especially given the price).
More importantly given that there is scripting to allow you to set up automated tests we're heading towards an investment in the product.
Might be nice if it was better on Windows (we do .NET development, mostly ASP.NET) but for the price... (-:
I've released an open source project for generating web service requests and making calls.
Whether something is the best is pretty subjective but give the program a try and compare it for yourself
Download it at http://drexyia.github.io/WsdlUI/
We've been using SoapUI since 1.x (will soon be adopting 3.0 from 2.5.1) and are all happy.
It's much more stable when running with native LnF (File - Preferences - UI Settings - Native LF).
I know it's available as an Eclipse plugin as well, but last I tried I failed to find how to add JAR-files to it (i.e. bin/ext in the stand-alone variant).