Beginning automation testing from scratch [closed] - java

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
How far a manual tester can upgrade himself to learn automation testing(java, selenium webdriver, testng).
which programming will be easy for stepping into scripting for beginners

You can upgrade yourself as much as you desire. There might be limitations on how quickly you can do it - due to your ability to find out time, level of interest and how things are at work.
In my experience, like any other language (french, german, hindi, etc.), each programming language has its semantics and syntax. The more time one spends practicing them (writing small programs, not reading from a book) the quicker one learns the language.
Being widely used and around for a long time, the support and learning avenues available for Java are much more so the process of getting help might be easier.
Java is also very helpful if you are trying to pick up selenium webdriver.
The task and scope of learning a scripting language becomes very specific when trying to learn it for automation testing. Usually, you will be able to get through solving fairly complex issues if you master the following concepts in Java:
OOP’s concept – Class, Objects Polymorphism, Inheritance and Encapsulation
Java Programming essentials- Object Instances, method overloading/overriding concepts and packages
Control Statements – While, do-While, Switch, If statements.
Looping statements - Helpful in scenarios like, iterating through a large table to find a record that you want and running the same test for multiple number of times
Arrays Concepts.
Java Collections Framework – ArrayLists and HashMaps – This will help us in maintaining a collection of data. Particularly useful for scenarios where you need to compare the data from Web app UI with the DB. [OR] From UI to another UI
File Streams – Used for externalization of data through CSV, Excel or Java Properties file.
Threads and MultiThreading Concepts – This will be helpful when trying to run scripts in different threads that will help in achieving better performance.

Easy Answer: Keep going to Stack Overflow. Read as much as you can, then go try it.
If you want a start, these are good to read up on:
Test format: TestNG
Text Editor: Visual Studio Code
Ruby Application Testing:
RSpec, Capybara, Selenium, Cucumber, Nightwatch, etc... etc...
React Application Testing: Jest
Java Application Testing: Apache Maven (Makes setting up the project easy), Java, Selenium
CI/CD: Jenkins

Related

Best Practices for UI Test Automation with selenium and Java [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
Our company is trying to adopt UI test automation. They showed me their previous attempt on Test Automation which was basically what you can expect from over worked QA engineers who are asked to create a test automation project alongside their other duties in short frame of time. From what i saw it had many flaws and wasn't successful. I am beginner in this field and i would like to find out about,
Any detailed guide of best practices in UI Test Automation
Any github repo for test automation project done by some
respectable company in software development showcasing best practices.
The reason i am posting here is that most of the guides i found online was basic or lacking details. Also it's impossible to find test automation project done by some software company. If any of you guys work in a company which has public repo kindly share it here that would be mighty helpful.
You probably aren't finding stuff online because typically those framework materials represent time and investment. They're either sell-able material (e.g. consultancies that have generic frameworks) or bespoke for a client (which e.g. expose internal system workings).
An automation framework starts with some requirements gathering. Loads of things to consider - Some sample thoughts:
Do you know what you want to test?
Is it purely web? Is it thick client? does it involve mobile? a mix and match?
Are you involved with the dev team? do you know what's been tested at the different levels before you get to the UI?
Do you have the right skills to follow this through?
If you google "automation framework requirements" you'll get a lot of ideas.
This article [disclaimer! - i wrote it] talks about automation problems you encounter from the top level without into the code. I'd consider most of those pretty good practice and there are parts of it you can plan for early on.
Taking a bit from the article:
Automation needs to test the right things
Automation needs to just run
Automation needs to run well
It uses examples from my career of things I've seen done wrong and how to correct them.
Beyond that....
Modern automation typically steers you towards the test automation pyramid (not my article this time).
When you get to the lower level, general programming rules are important. I can't give you a direct steer on a framework you've not designed but simple rules help:
DRY
YAGNI
SOLID (as much as you can)
Final thought here is you don't have to build a framework.There are generic open source frameworks out there which can get you started.
Make sure that application is in Regression stage
Automating and stabilizing tests take a lot of time
Don't try to automate everything in the beginning. Automate the most important tests. Flows which are followed by most of the people on the Website.
Decide the framework - data-driven or hybrid or POM
The decision of which framework to use saves a lot of time in the future. Data-driven is most simple and easy to change as well. POM and hybrid are complex but can be more reusable.
Look and understand some existing automation frameworks before you choose a new one.
Decide on the type of reporting you to need
Using Selenium for automated testing is a learning curve. It’s not as simple as copying from a working example. This is an article on Selenium automation testing to help you get started with learning the best practices. When beginning your journey with Selenium, identify a small UI feature to automate so you can familiarise yourself with the setup of required components, and how to run and manage the test. Try start with testing something like a login process, after which you can create more tests that incorporate more UI functionality once you fully understand the whole Selenium/Java environment.

Alternative to Gatling [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 months ago.
Improve this question
I’ve been having issues lately because my dependencies has been updated to use netty 4.1 and Gatling has not been updated for a while, and still work only on Netty 4.0.
Anybody knows any alternative to Gatling to create similar Simulations and scenarios for the performance test to be run automatically in my Maven life cycle?
If you look for something code-based it would be:
Locust
Grinder
For UI and/or XML based scenario definition you can check out:
Tsung (this one can be reliably run on Linux/Unix only)
Apache JMeter
Check out Open Source Load Testing Tools: Which One Should You Use? to learn more about the aforementioned tools and decide which one fits to your most.
As a nice replacement for Gatling I would recommend you to check the Locust. The good thing about the Locust specifically for you is that it is code based performance testing tool which does not enforce you to write the tests only in a specific programming language like Python. Because if you used Scala before, you might be more comfortable to switch to something like Java or even Kotlin while writing your tests which is more than doable using Locust framework. You can find the handy tutorial by this link:
https://www.blazemeter.com/blog/locust-performance-testing-using-java-and-kotlin
Here's also a benchmark comparison of different tools.
If you are javascript/Ecma familiar k6 does the job.
Apache JMeter is a known alternative to Gatling.
It is frequently updated (at least 2 major releases per year) and has a strong user base and a lot of commercial offers.
There is a Maven Plugin that is being recently much more frequently updated, there has been 4 releases in 2 months.
Look at code coverage in more details.
k6 is a good alternative, if js is not a problem for you. https://k6.io/

Reverse Engineering poorly documented Java from source [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 1 year ago.
Improve this question
I'm a systems engineer, recent college grad, and I've just been given a project that is exceptionally daunting.
We have a legacy system, we legally own the entire code and all rights to it. The problem is that the code is poorly documented, what little documentation is incomplete, sometimes wrong and the original devs are unavailable.
It uses a custom Perl build script requires a thousand modules from CPAN to work and I do not know Perl. Reverse engineering into UML has failed except with Doxygen and that is limited to just inheritance diagrams and call graphs.
I've obtained a massive chalkboard and I'm slowly trawling through the code, modeling packages and then the nested packages within.
My question is whether or not I'm approaching this reverse engineering from the right direction. I'm working close from the bottom trying to figure out what calls what while developing UML and writing a Design Document. I did a package diagram but it's hard to figure out what's going on at that high a level.
An academic paper I pulled up suggests I also make a new Requirements Document which would slow me down even more and I don't know if it's a good idea as the other developers are always busy trying to keep the legacy system up.
Are there any books out there that can help me and am I approaching this from the right angle? Should I hire a contract worker that knows Perl and JMX to assist me?
The book "Working Effectively with Legacy Code" by Michael Feathers will probably help you more than anything we can tell you here.
However, the most important thing you need to clarify for yourself (and from your question it sounds like it's not completely clear) is this: what is your goal? What do you want to achieve with this codebase?
If the answer is (as it sounds) "being able to effectively maintain the existing project", then trying to directly build a complete high-level model of the system may not be the most effective path. It's probably just too much at once to keep in mind.
In this case, I would try to understand only the use cases of the system that you currently need to modify; follow method calls through the code (pssibly using a debugger on the running system) to see what parts are involved. Do this for a few different use cases and you'll start to see patterns, then document those and gradually fit them together into a high-level image of the system.
This tool might assist you.
Or if the legacy system is written poorly it could just make a huge unreadable mess, but I hope it helps.
If it is a java code then a deep reverse engineering would be very helpful.
See a documentation at: http://www.ejb3.org/jar_file_reverse/jar_file_reverse.html

How to transition from OO development to Web-Development? [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 months ago.
Improve this question
I just graduated last year and I landed a job in the CRM space, specifically with Salesforce.com and its respective platform. My problem is that there are 2 languages used to do things on this platform one is relatively similar to java and is OO the other is a web-development language similar to js, but not quite. I come from a java background.
I have had limited practice with web development in the past and was always interested in it but found it difficult.
Now that I have been thrust into this world I'm finding it hard to complete tasks simply because things do not function the way I am used to in the OO world. I'd write code that would compile, test and get aggravated when things simply do not function as expected!
What do you guys suggest would be best for me to read and comprehend in order to transition my OO thinking into web-development thinking.... I'm thinking I should learn things such as 'states, MVC etc etc.' but just don't know where to begin...
Thanks for all the help!
If you mean Object Oriented with the shortcut OO I have to disagree, because most web development languages are in fact object oriented (and you really shouldn't switch from a object oriented to a procedural server sided programming language). So what you of course need is understanding of your server sided language, be it PHP, Java, Ruby or whatever and that all of them in the end just generate some form of String output (which usually HTML). So you should be aware of all the technologies and how they interact (e.g. HTML, CSS, JavaScript/AJAX, your server sided language framework and so on) and have a understanding of how the transport protocol (meaning mainly HTTP) works and what the disadvantages/advantages are.
If you already did more OO development you should at least have heard about MVC which is (with some adaptions to HTTP being a stateless protocol) probably one of the more important patterns to transfer into and use in the web dev world.
It sounds like you are having trouble getting started with Apex and Visualforce, the two technologies used for development on the Force.com platform.
I'd recommend reading through the developer.force.com site. In particular check out the tutorials.
As far as object oriented development with Apex goes, start by reading Object Oriented Apex - Practical Usage.
It might also be worthwhile to cruise through the message boards and see what questions other people are asking. The community is pretty active. If you have specific questions, you can ask them or stackoverflow.
In my experience, working on web projects instantly reduces my productivity by 50%. It takes me twice as long to get something working in a web project compared with a compiled executable program.
You're working in mutliple languages that interact in ways that you need to control in a very specific way. Your mindset changes depending on if you're writing code for the client-side, or server-side. (Some of this goes away if you're doing Google's Web Toolkit coding).
I won't even go into the added difficulties of debugging web based products when compared with debugging a typical executable.
Most of the langauges do support some form of Object Orientation, and when they don't, typically developers will separate functionality into different files based on Object Oriented techniques. I think you'll find that knowledge will still apply.
Web development fully embraces OO if used with frameworks like .NET and JSF.
You need to start thinking in terms of web application logic and behavior. The OO concepts are there to help you and be your tools.
If you mean client side languages like Javascript/action scripts. Try Dojo framework for javascript development, it has a great model using an OO approach.

State Machine Framework for JBoss/Java? [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 7 years ago.
Improve this question
We are developing an application that involves a lot of different tests where each test lead the users to a number of steps. We are thinking of using a state machine framework to capture the states/transitions out of the code. We are also thinking of using rule engine to supplement on the rules. Anyone has experience with any state machine framework that would work with JBoss and/or Java? Thanks in advance.
-nguyen
jbpm does this and integrates well with jboss. In my experience, it's pretty easy to use and is powerful.
You might want to look at StatefulJ. It is built off of Spring Data for Persistence support and the State Model itself is defined using Annotations. This approach makes it easier to set up and maintain vs. XML. Regarding rules - I've used Drools in the past and seems very well supported.
Disclaimer: I am the author of StatefulJ
if you are building some screen to screen transition - based system, then you should definately check out Spring WebFlow http://springframework.org/webflow
I have had very good experiences with using ragel to build easily maintainable state machines. The resulting java code is of very high quality. However, it is purely a state machine generator with no specific usage intended, so you might find other solutions that will more seamlessly work in a web related problem domain.
Maybe you can take a look at JBoss PVM. It is still in alpha, but can be used to model any type of state machine. We are also looking into it for gui transitions.
http://www.jboss.org/jbossjbpm/pvm
Try Activiti, seems a lot of people are using it.
http://activiti.org
For the rules engine part you could use Drools, of course.
Have a look at StateBuilderJava, a state machine code generator that transforms an XML description of a state machine into an extended version of the Java state pattern. It supports all UML semantics: state machine can be hierarchical, concurrent and asynchronous.
Each test scenario can be modelled with a state machine Xml description, the code generator writes the state pattern of your behalf, which is tedious and error prone if done by hand.
The other advantage is to visualize and edit the test scenario with a graphical tool.
This allows to quickly implement and document a set of test scenarios.
In the examples, a test suite of an XMPP client has be written to illustrate how state machine code generators can be used to write complex test scenarios easily and quickly.
Disclaimer: I'm the author of these software.
I've used activiti.
It is the best framework.
It is a light-weight workflow and Business Process Management (BPM) Platform.
Open Source and works on any Java Platform or cloud.
All one needs to have is the knowledge of BPMN , Maven , Spring and Activiti.

Categories

Resources