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
What i have done :
Created few projects using Java/ Selenium Webdriver/ TestNG using eclipse
Getting the TestNG test results in an XML/ HTML formats and looking for failures etc.,
What i can look for hereafter,
Do i need to use Maven(or likely tools), for managing projects, and why?
Do i need to look for Jenkins type of tools(But i know it depends on context, still if there will be any real usability with selenium webdriver)
Do i need to look for reporting tools(such as surefire) which is well equiped?
Or is it ok to continue with what i'm doing for a not so complicated project?
I know this qustion may be really broad, but i don't find anything solid to look after.
Appreciate your help, Thanks!
I think the world has agreed that Continuous Integration is good which is pretty rare for any technology.
I would definitely suggest setting up jenkins or equivalent and adding the maven configuration to be able to get your project to run and store results there. This may end up being more work because ideally you want to get the project you are testing to be built on check in and have its unit tests etc to run and then get deployed so you can run your selenium tests.
It shouldnt take too long to do depending on the ease of deployment of the app your testing, but even just having your tests being able to be kicked off automatically and its results stored will be handy and give you a real visibility boost of your tests.
Related
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 2 years ago.
Improve this question
I don't get why would anyone want to use tools like Gradle or Maven, I mean what do they even do? I tried to understand and use them but that got me no where they just unnecessarily complicate things and create a lot of what seems to be absolutely useless files.
So, why bother at all and use these tools and what are they good for?
First of all Gradle and Maven are great tools for managing your dependencies and also giving you the option to simplify your build process. Without these tools you would have to manually download *.jar files. And copy them somewhere in your project folder.
And if you want to update, you would have to open the website again, download it and replace your existing JAR.
Quite often JARs themself have dependencies, so you would have to manually download them as well.
I can understand that the setup of Maven / Gradle at first can be time consuming, but it's usually worth the time since you just have to declare: I need package com.example.package in version 1.2.3 and you just have to run a simple install command and they will take care of downloading everything needed.
Secondly, you can declare commands describing how to run your tests and they will usually take care of your tests not getting mixed up with your final and compiled package.
Also this is good for collaboration because once this config is shared, every developer can use it without going much of a hassle of configuring your development environment. Another good point is that it is independent of any IDE, so your project is not an IntelliJ or Eclipse project and everyone can use the IDE/editor they prefer.
Basically the idea is: You configure it once and then you can enjoy the automatism.
However, if your project is really small and relying on only a few dependencies you might not need it.
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 7 years ago.
Improve this question
Page Object Pattern is obvious. But what I can do more to build better automated test cases for web application?
I may not be able to talk about any standard pattern, but here are a few things that I consider:
Make good use of Test Execution frameworks. I use TestNG.
I create a base file which makes use of most of the TestNG annotations for Setting and Tearing up.
Separate your Re-usable functions and call it wherever needed. I generally add these in the base class.
I personally prefer keeping locators too in the base file if they are too complicated. This would help you to change the locator from one place and get reflected for all. In this case, do follow a good naming convention.
Use collections wherever possible.
You can use something like ReportNG for more user friendly reports.
Make more use of implicit waits and avoid using JavascriptExecutors.
Copy the Drivers and libraries within the project folders for better mobility and less external dependencies.
Adding selenium WD javadoc to your project will be of some help.
We also make sure we have a screenshot for failed test case by over-riding the onTestFailure method.
Rest all are simple coding basics for cleaner and easy to understand code that I believe you'll be following anyway.
Hope this was of some help. Will add more points if I'm able to recall. Also, please let me know if you need more details for any of these things.
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 7 years ago.
Improve this question
In our current project, we don't actually practice unit testing. Our bosses are encouraging us to go for build automation like Jenkins. Will a build automation tool really help us in productivity or quality?
It will probably help a bit, but not as much as with tests to back it up.
For example, build automation, if configured for every attempt to submit code, will ensure that if the build fails, i.e. can't compile, then either the code is prevented from entering the main branch where everyone else is working or at the very least, make sure everyone is aware the build is broken. This depends on whether your build automation runs before or after the code is merged to the branch everyone else is working on.
This would ensure that at a minimum the code at least compiles, and therefore that others on the team don't have to wrestle with code that doesn't compile and lose time trying to pinpoint errors in other code.
Depending on how much build automation is included, you might even have deliverable artifacts ready to be manually tested which saves the time of performing those builds.
But that's about the limit of it, unless you have some tests.
As a side note, the reason I said probably, is none of it is worth anything unless attention is paid to the results. If the results are there but never really followed up on, then the reality is zero value.
Sure, automating your build will improve your productivity and quality even if you haven't written any tests yet. You won't have to build manually every time someone wants a build to test or release, and you'll find out faster if you have a compilation or other build error.
But you should certainly write tests as well, and run them automatically too.
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
I need to write a web app from scratch with a date picker that allows user to select date and then queries the database according to thee input provided by the user and displays results. This will be deployed on the companies web servers(they have various apps on a server). However, i have no idea where to start as i have never written a web app before. Also i will need a local test and prod environment set up. Where should i start, what all needs to be included in my classpath. How do i install build tools and configure them?Eventually more people will work on enhancing the app but i first need to get it set up and deployed on prod. This will be written in java.
Cant comment due to low reputation, so i have to post my suggestion as an answer.
As JonK posted, this site is about specific code problems, but i'd suggest you looking into a few things, that might help you with your task.
Choosing from a various possibilities, is a tricky thing, and if i ware you, i would ask at your work with is more common there, so help with problems in development would be near ;)
Spring framework is quite popular and you will find plenty tutorials for it
JSF is a interesting one, and if you will choose this one, at SO, you can look into answers provided by user BalusC. As some one said to me, if Balus has written about something, then it is as he said ;)
Struts is not something that I've tied yet, but it is a choice.
And plenty more, most of them has been mentioned here
But as i said, ask at your work place, what they are using.
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 9 years ago.
Improve this question
Actually, i'm trying to run the same java selenium automation framework in multiple systems using their IP address. Is this possible in threads using different instances ?
How? is this possible ?
This will be possible suppose the automation is written as a test script then selenium instances will be called from python or java. Then you may implement the threading from the test script. This will lead to the script opening a lot of browsers at the same time, then it will need to be executed on a powerful computer, with sufficient amount of CPU load and RAM to support such numbers of browsers.
This is not an usual practice since the idea of using selenium should be to perform black-box and functional testing. While something that needs threading sounds more like a performance or stress test, which should be done with unit testing codes, e.g. JUnit