This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am a tester with knowledge in basics of java concepts and programming.
So far have been using gui test automation tool selenium. So I have been using selenium api to test the web pages and functionality.
But from next week I am assigned to another team where I have to pair up with a senior Java programmer to write junit tests for his code and also write the functional automation tests(setting up framework by myself) for the project using javascipt etc as required. They have few junit tests in place. Apologies, I only managed to get these details from my non technical manager at the moment as my next team is quite busy with a release.
First of all, if a senior developer is not writing his/her unit tests, there's something completely wrong with the company you working for. A developer who doesn't write unit tests should be a developer without a job.
I understand you don't have much control over this, and in fact, this might be a good opportunity for you to learn from a senior person. it will be a little difficult because when you run whitebox unit tests, you have to be able to understand the inner logic of the module being tested. That probably means that you will have to read this dev's code and understand it completely. If you are using a test driven development approach, you write the tests first based on the use cases. I have no idea what approach your dev is going to take. JUnit tests are usually written in Java. SO, either way you will need to write Java, and you might have to understand his code, or have a good understand of the requirements.
What do you need help with first? DO you need to learn JUnit tests? JUnit is not that hard. Basically, you put a test method in a test class and annotate it @Test annotation. The test method should run the test case. Here's the getting started guide for JUnit
Joined: Jun 11, 2013
Thanks so much Jayesh.
I understand I should learn Java completely which is going to be timetaking
Could you please suggest some reliable books for this.When I searched for Headfirst Java(only 1.5 is available)
That's a very broad question. There are a lot of things you can learn after you learn basic Java. Ordinarily, people learn JEE, starting with Servlets & JSP. However, since you a specific project that you are going into, I would find what stack of technologies is used by that project, and find a path to learn those technologies.
Joined: Jun 11, 2013
Thanks for response
True. I need to learn advanced core Java well and then move to the below stack which they use
JEE -JSP and Servlets, Jersey,JaxB ,JMS
Can you suggest good books for advanced core Java please
Head First Java seems easy to read but they dont have Java6:-(
If you, a tester, are paired up with a developer, I would imagine the purpose of such a pairing was not be so much to have the tester write automated test code but rather for the tester to provide input to the developer so that appropriate higher-level tests can be written. The tester would provide insights from a user's point of view so that automated functional tests can be written (more black box in nature than white box). The developer should already have written unit test code that exercise the core design and data structures and demonstrate internal code quality.
If you want to learn about using JUnit effectively, that's fine but if I were you I would first get in touch with the developer that you're going to pair with and set some expectations along the lines I just mentioned. IMO, it would be unreasonable to expect you to write JUnit tests just because you're a tester, despite having little or no prior experience with JUnit. What you can contribute is your deeper knowledge and understanding of the requirements and your ability to formulate tests around scenarios that the developer might not have thought about as he was developing with a focus on internal quality. That is the best value that you can bring to the table with this type of pairing.