Selenium Java + TestNG integration with TFS - java

I have my selenium code in Java with TestNg framework (used Eclipse as code editor), but now I need to integrate it in TFS. I am very new to TFS but I have seen many ppl told it is possible so if somebody can help me with exact steps from starting it would be really helpful. If some hidden tips and tricks also , any body can suggest for smooth integration please do so. Thanks in advance for your time!!

The first thing is setting up your environment, both local and build server. You'd better to make they are some as each other, which could significantly reduce build issue/error.
For your local develop environment, please use Visual Studio Team Explorer Everywhere for Eclipse (VSTS and TFS) which is a plug-in for Eclipse that enables you to work with Team Foundation Server (TFS) and Visual Studio Team Services (VSTS) using both Team Foundation Version Control (TFVC) and Git version control systems.
Since you are new to TFS, suggest you first go through the build and deploy pipeline of JAVA projects with TFS. -- Working with Visual Studio Team Services (VSTS) and Java
About Selenium and test, please take a look at below tutorials:
Testing Java applications with VSTS
Selenium Java Integration with Team Foundation Server
Get started with Selenium testing in a CD pipeline

Related

Selenium for IntelliJ IDEA

I am relatively new to Selenium.
Currently in my company we use Eclipse to create and run our testing automation (Maven/Cucumber/Selenium).
We also use IntelliJ IDEA for Java development.
My question would be if it is possible to use IntelliJ IDEA for testing automation similarly like we use Eclipse (Maven/Cucumber/Selenium)? I mean to build test automation scripts.
If yes, so you could you kindly recommend any tutorial where it is explained how build those projects for IntelliJ IDEA.
Thank you in advance
this question has a simple answer. Whatever your company does in Eclipse, you can do in InteliJ.
BOTH Eclipse and InteliJ are IDE's (An integrated development environment for building applications that combines common developer tools into a single graphical user interface). So basically, consider them both like "code editors". There is really no difference in using Eclipse or InteliJ (maybe some UI differences).
Personally, I prefer InteliJ based on cleaner UI. You pick yours.
Here is one useful tutorial. Good luck :)
https://www.youtube.com/watch?v=JPLk4Z0U0yQ

Execute Selenium java scripts from Release Definition in TFS 2015

We have a test suite automated in Selenium with Java using Maven.
Now we have TFS 2015 and we were able to use the Maven task to build the selenium project in Build Definition in TFS 2015.
I have seen several links which describe executing Selenium scripts in C# from TFS Release Definition on a remote machine, but I could not find any information on how the Selenium scripts developed in java can be triggered from TFS Release Definition.
We don't want to re-do the whole automation in C#.
So please can you help me to know how Selenium java scripts can be triggered from TFS 2015 and results can be copied back to the release definition?
This should similar as this thread: Selenium Java Integration with Team Foundation Server
First, let's divide and conquer. You want TFS integration with Java,
TFS doesn't care if you use Selenium or another framework. Second, you
want to read TestNG results into TFS. As it's possible, I'm not sure
it's a good solution and maybe you should moving to C# and .NET in
your testing.
So to answer your questions:
You can either read xUnit results to TFS, or implement your own IReporter and read it with TFS API.
Running your scripts is simply running Java with TFS.
Yes TFS is natively for C#, but there are extensions for Java, so integration is possible, though it's not as smooth as working with
something native for your programming language.
TFS and Java can be integrated as explained above.

TFS- Selenium java integration

I have written selenium tests in eclipse java. I have manual test cases in tfs. Is there a way to update automation test status in tfs thru java code
About the TFS and java integration, take a look at below question:
Microsoft provide a full, rich TFS Plug-in for Eclipse (called
Team Explorer Everywhere). This provides full source control, work item tracking, build, sharepoint, reports access etc into TFS from
Eclipse based IDE's. It's written in 100% Java and talks directly to
the web services exposed by TFS.
Source Link:
TFS for Java - bad idea?
More details about how to get the best out of TFS if you are a Java developer, checkout: Working with Visual Studio Team Services (VSTS)/TFS and Java
If you want to link Java Test Automation with Microsoft Test Manager, TFS , Test Cases, which is not support for now, track this uservoice: Enable Java Automated Test to execute from MTM and get the java test automation linked to manual test cases
If you want to update automation test results/report in tfs, possibility duplicate of this question: Selenium Java Integration with Team Foundation Server Please go through the details in the answer, which should be helpful for you.

Install java,ide and create a sample web application

I recently received a macbook pro.
I wanted to to learn java,jsp and develop some sample web applications in my local machine.
Can anyone provide me a specific link where I can perform the following on my Mac Os to get started:
Install Java
Install an IDE.
set up tomcat
Tutorial for creating learning sample program that contains java,jsp
connect to a local db and test it out in my local web browser.
I know there are lot of different instructions in the web, i would appreciate if some of the experts here point me to the best way to get started .
Will already be installed on a mac
I would suggest either IntelliJ or Eclipse as two examples of good Java IDEs. Both have very good support for developing web applications in Java. The IDE question is probably never ending, so it's really a case of what works for you.
For Tomcat you can't beat these instructions.
Each framework has its own instructions. Perhaps start with Spring or Play! for java

Automatic deployment in GAE from subversion trunk

My team is developing a Java application which is to be deployed on Google App Engine(GAE). Currently we use the eclipse-plugin to build and deploy the code in GAE.
However, I would like to automate(by using cron or svn-post-commit hook) this process so that the source code in subversion trunk is automatically deployed in GAE before each scrum meeting. I hope this would eventually reduce the load on our programmers and help them to focus more on the application logic.
Please let me know if this is possible with Java+GAE+Subversion
thanks in advance
It is possible. This is what I did with my project. I should also note that this question is similar with another stackoverflow question in Possible to integrate Google AppEngine and Google Code for continuous integration? and it provides several good answer that you could use.
That being said, my personal approach is to set up ant build for the eclipse project, and use Jenkins to automatically update the code from Subversion and build them up using the ant build.
You could then add a target using appcfg and macro provided by google to upload your built project to Google App Engine. More details of using Ant on Google App Engine could be seen in here.
A bonus point of using continuous integration tools such as Jenkins is that you could add automated unit testing using JUnit or your personal testing flavor. It will save your team lots of headaches in the long run.
I used python for GAE and there is a appcfg.py script with which one can deploy the code with one command as -
python appcfg.py update
This makes me think that for Java as well there must be some script from Google to deploy applications. If there is one, then what you are trying to do must be a simple command which be used a cron job.
Your team should use a Continuous Integration tool, e.g. Jenkins. This will solve your next problems too, which you may not thought over: it can be configured to run unit and integration tests before deployment. It has many options for version control system integration.

Categories

Resources