开发者

Language to learn to move out of manual testing towards automated/programming [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 as a manual tester and documentation (Test plans etc.) personnel in a company's software/IT division. I do not have a big programming background but I want learn programming language(s) and tool(s). Hence, I am looking for automated testing tools and programming language(s) to learn which also give me industrial advantage.

Some points to note are:

  1. I need to know which tools are the most common in the industry and languages associated with those tools.
  2. I do not have a lot of time to learn loads of stuff. Hence, I am looking for tools which use languages that are beneficial to learn in case I want to do more programming.
  3. I'd prefer Web based app testing but that is not a constraint.
  4. You can give 2-3 languages as I understand there cannot be one winner.
  5. I have done some QTP which uses VBScript but VBScript is not broadly used. I want to learn a language that had broader base.
  6. Please still give your inputs and ideas even if this question seems really difficult to answer.

Thanks in advance.


EDIT: I think so far I have decided that I will go for:

  1. QTP
  2. Selenium
  3. Test Driven Development Methodologies

I just need to figure out a good programming language that gives me a programmer's edge and is suitable for multiple testing tools (including Selenium). Maybe Python, Ruby or Java?


Wow this is quite a widesweeping question. I'd say you were in a good position as the industry moves towards a Test Driven Development (or write your tests before your code) model.

First of all you'll want to know about Unit Testing, Continuous Integration and Web Automation.

I'm going to focus on the areas I know (.NET, Java, Javascript, Build automation, Selenium)

  1. In .NET NUnit is probably the most widely used unit testing framework. It is a port (copy of) JUnit in the java world. Most unit testing frameworks are very similar to these in terms of the concepts. So learn one and it won't take you long to pick up the others.

  2. I think reading the above links and having an idea about these concepts will get you on your way. It's probably worth experimenting with Python or Ruby as these have low barriers to entry to mess around with some simple tests.

  3. For web based testing the most well known are probably Selenium and Watin. These allow you to script browsers to perform actions automatically. However, I have come across very few good usage of these and they are very fiddly (you're talking days/weeks of effort) to get set up and useful. Again the concepts behind these are similar whatever framework you use.

    Think I answered 4,5,6 in 1,2,3 :-)

HTH


As for 'industrial advantage' it depends what you mean by that.

For big companies QTP is widely used. Thing to learn with QTP is not really the language, but the tool itself. For me it was more troublesome to overcome tool specifics than learning VBscript. If you would think about performance testing, than PerformanceCenter would be probably the choice. Here you have C as language but again, there is more struggle with a tool than with a language. In some companies there is stack from IBM, so Rational software comes to play (FunctionalTester, Robot, PerformanceTester). There is also a bit of tool complexity to get through (IBM Redbobks can help).

In smaller companies Java/C# could be beneficial. Here you can get familiar with junit/nunit/TestNG/MSTest. For webapps things like Selenium/Watij/Watin/Fit/Fitness/Concordian are worth to look at. If you have a moment look at AutoIT,PowerShell,Python,Fiddler,Jmeter, Abbot, Watir/Cucumber,Sikuli.

There is also lots of other tools like WebAii, TestComplete, Twist.. some others commercial tools. Usually you can get trials for them to play with it for week or two.

Everything depends on what kinds of project you will be exposed to, and what kind of company it will be.

Regardless, in my opinion it is enough to learn Java/C# to some degree. You don't need to be C#/Java ninja, know every library, and study really hard given language. You see Developing software is more than knowing a programming language, and test automation is more than knowing a tool/language (M. Fewster & D. Graham), so don't get obsessive about it. If you can program script in QTP (not record but program, using Descriptive Programming, decomposing logic to libraries, having full control of TestResults via proper methods etc.), than other tools won't be an issue. You may need like week or two to learn basics of given language, but that is all for test automation (for start at least). You need more to have some experience, to know tools, to know concepts, to know pros and cons of different approaches, to have bigger picture in head, than just 'how do I write this in that language' (you have SO for this :D ).


The answer to this question really depends on a couple of things. First, what kind of testing are you doing? Testing web-based applications? Testing libraries/components of a larger program? GUI testing? Testing command-line apps?

I have found the following useful when creating scripted/automated test facilities:

TCL - TCL can interface with the command line as easily as a batch file, but has a powerful language that blows batch out of the water (including GUI capabilities). If you are scripting Windows-based console apps (either to test them or to use them to test something else), I recommend taking the time to lean TCL.

AutoIt - This scripting language lets you automate UI interaction with Windows apps quickly and easily. It is also fairly easy to learn. If you want to take the time and trouble to develop a screen-scraping utility, you can combine it with AutoIt to create some pretty sophisticated test systems.

C - When testing compiled libraries, I have had a surprising degree of success using good 'ol C. I'll write the basic skeleton for a test app and create a scripted utility that will dynamically generate the rest of the code based on what tests need to be run (I give it a library of sample C snippets that it can use for more complicated tasks).

Ruby - When you are doing automated testing, a robust scripting language can go very far. Whether you need to parse test logs, generate reports, or auto-generate test scripts, a scripting language that you know well can save you a lot of time and headache. My language of choice is Ruby, but others at my company prefer other languages such as Perl or Python. Language choice isn't too important, pick one and learn it well.

Depending on what it is that you are testing, you may also have some sort of testing tools built into the code that you are testing. Java code is sometimes written with JUnit tests, Ruby code can use the Test::Unit framework, etc. Here is a list of unit testing frameworks for a wide variety of languages. If the code you are testing was built with unit testing in mind, you will want to learn the language the code was written in so that you can take advantage of these unit tests.


For web based testing you might want to check out fitnesse. Also, an automated test framework built on python is the robot framework.


  1. Selenium is very popular for automated testing at the QA level.
  2. No matter what you do, there will be some learning curve associated with your solution
  3. The point of Selenium is to provide a testing framework for webapps -- you use Selenium to manipulate DOM elements in the browser, no a running version of your application.
  4. Selenium is a client/server model (you run the server somewhere that has access to your QA app instance; you code your tests using the client libraries) that provides clients in a number of languages (java, ruby, etc)

  5. This type of testing is a good idea if you have have dedicated QA resources that can write code. It provides some high level regression testing. However it is not without its drawbacks: (1) tests can take some time to run, (2) you might need to make some changes to your web application dom elements to use the framework easily, (3) changing the web app will require changing your testing code, which can be non trivial.

Your other options is to write unit tests for the application code. Usually the developers do this as part of a test-driven process. So there is TDD for developers and then automated QA testing for QA.


I will also add a small comment

There is a new testing automation platform XML2Selenium

This platform is built on top of classis Selenium framework and provides many useful features

But it is quite easy to use

You don't need to learn any java or ruby - you can write in XML

SMth like that:

<!-- here we have some imports Frame - is like a class, you can extend it with extends -->
<import resource="Demo.a-server/03Registration/framesRegist.xml" name="frames"/>
<import resource="Demo.a-server/01Action/FramesAction.xml" name="framesAct"/>
<import resource="Demo.a-server/03Registration/FramesLogin.xml" name="framesLog"/>

<property resource="Demo.a-server/LogValue.properties" name="logValue"/>
<test name="creatAction" description="create and check action">

<frame extends="frames:logAdmin"/>
<frame extends="framesAct:createAct"/>

// here we upload the image
<upload id="img_id0" resource="image.jpg"/>

// click save button with id=save
<button id="save" />

// make a screen shot 
<screenshot/>

// sleep for 3 seconds 
<pause time="3000" />

// make a screenshot again
<screenshot/>

// navigate to the given URL:
<navigate to="${logValue.baseUrl}/admin"/> 

<frame extends="framesLog:logOutAdmin"/>
<pause time="1000"/>
</test> 

Here you can see report with errors: http://xml2selenium.com/demored/xml2selenium/

And here you can see report with successful state: http://xml2selenium.com/demogreen/xml2selenium/

PS: It supports testing in All browsers, not only in Firefox as Selenium IDE


  • Yes you can learn selenium IDE, Its just as an add-on on the firefox browser, using which you can record your tests and play them when required. The limitation of IDE is it can only be used on firefox.

  • If you are looking to test on multiple browsers, you need Selenium Grid or WebDriver, which requires a knowledge of java. And again you are not needed to be a Java pro to do this, a simple learning will help.

  • You can search the youtube.com for Selenium Tutorials.

Advantages of Selenium :

  1. Its Open sourse!!
  2. Its easy to learn and impliment..
  3. Supports multiple browsers.
  4. Supports multiple scripting/programming languages.
  5. Flexible to your choice, simple record and playback (IDE), Comple Framework design to your choice by using your favorite programming language.
  6. Supports parellel execution.

Hope this will help you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜