Ultra Code 2016-12-16 00:37:00

Ankit Gupta
Week-8
Software Testing Life Cycle

Contary to poular belief, software testing is not a just a single activity. it consists of series of activities carried out methodologically to help certify your software product. These activities constitute the software testing life cycle.
Requirent Analysis – during this phase, test team studies the requirements from a testing point of view to identify the testable requirements. The QA team may interact with various stakeholders to understand the requirements in detail.
Activities- identify types of tests to be performed.
grater details about testing priorities and focus.
Test Planning- This phase is also called test strategy phase typically, in this stage, a senior QA manager will determine effort and cost estimates for the project and would prepare and finalize the test plan.
Test Case Development- this phase involves creation, verification and rework of test cases & test scripts. test data, is identified / created and is reviewed and then reworked as well.
Test Environment setup- Test environment decides the software and hardware conditions under which a work product is tested. test environment setup is one of the critical aspect of testing process and can be done in parallel with test case development stage test team may not be involved in this activity if the customer team provides the test environment in which case the test team is required to do a readliness check of the given environment.

From the blog Ultra Code by Anonymous and used with permission of the author. All other rights reserved by the author.

Ultra Code 2016-12-16 00:37:00

Ankit Gupta
Week-8
Software Testing Life Cycle

Contary to poular belief, software testing is not a just a single activity. it consists of series of activities carried out methodologically to help certify your software product. These activities constitute the software testing life cycle.
Requirent Analysis – during this phase, test team studies the requirements from a testing point of view to identify the testable requirements. The QA team may interact with various stakeholders to understand the requirements in detail.
Activities- identify types of tests to be performed.
grater details about testing priorities and focus.
Test Planning- This phase is also called test strategy phase typically, in this stage, a senior QA manager will determine effort and cost estimates for the project and would prepare and finalize the test plan.
Test Case Development- this phase involves creation, verification and rework of test cases & test scripts. test data, is identified / created and is reviewed and then reworked as well.
Test Environment setup- Test environment decides the software and hardware conditions under which a work product is tested. test environment setup is one of the critical aspect of testing process and can be done in parallel with test case development stage test team may not be involved in this activity if the customer team provides the test environment in which case the test team is required to do a readliness check of the given environment.

From the blog Ultra Code by Anonymous and used with permission of the author. All other rights reserved by the author.

Ultra Code 2016-12-16 00:37:00

Ankit Gupta
Week-8
Software Testing Life Cycle

Contary to poular belief, software testing is not a just a single activity. it consists of series of activities carried out methodologically to help certify your software product. These activities constitute the software testing life cycle.
Requirent Analysis – during this phase, test team studies the requirements from a testing point of view to identify the testable requirements. The QA team may interact with various stakeholders to understand the requirements in detail.
Activities- identify types of tests to be performed.
grater details about testing priorities and focus.
Test Planning- This phase is also called test strategy phase typically, in this stage, a senior QA manager will determine effort and cost estimates for the project and would prepare and finalize the test plan.
Test Case Development- this phase involves creation, verification and rework of test cases & test scripts. test data, is identified / created and is reviewed and then reworked as well.
Test Environment setup- Test environment decides the software and hardware conditions under which a work product is tested. test environment setup is one of the critical aspect of testing process and can be done in parallel with test case development stage test team may not be involved in this activity if the customer team provides the test environment in which case the test team is required to do a readliness check of the given environment.

From the blog Ultra Code by Anonymous and used with permission of the author. All other rights reserved by the author.

Ultra Code 2016-12-16 00:37:00

Ankit Gupta
Week-8
Software Testing Life Cycle

Contary to poular belief, software testing is not a just a single activity. it consists of series of activities carried out methodologically to help certify your software product. These activities constitute the software testing life cycle.
Requirent Analysis – during this phase, test team studies the requirements from a testing point of view to identify the testable requirements. The QA team may interact with various stakeholders to understand the requirements in detail.
Activities- identify types of tests to be performed.
grater details about testing priorities and focus.
Test Planning- This phase is also called test strategy phase typically, in this stage, a senior QA manager will determine effort and cost estimates for the project and would prepare and finalize the test plan.
Test Case Development- this phase involves creation, verification and rework of test cases & test scripts. test data, is identified / created and is reviewed and then reworked as well.
Test Environment setup- Test environment decides the software and hardware conditions under which a work product is tested. test environment setup is one of the critical aspect of testing process and can be done in parallel with test case development stage test team may not be involved in this activity if the customer team provides the test environment in which case the test team is required to do a readliness check of the given environment.

From the blog Ultra Code by Alex Gupta and used with permission of the author. All other rights reserved by the author.

Object Oriented Testing

 

In object  oriented unit testing, select as units is the traditional way to unit test. In methods as units, we use mock objects with stubs and drivers that test the program and supply test cases to record results.  We look at each individual method and then we see the result of the execution.  When treating class as a unit, it solves the intraclass integration problem, but it introduces other problems such as ignoring inheritance.  It is best used when little inheritance occurs and classes have internal control complexity.

When testing class as unit, if we flatten the class, original hierarchy must be restored. Also testing methods if added must be removed. If we are testing per method, we have to integrate the operations into the full class, and also integrate the class the method in with other classes.

 

http://www.ambysoft.com/essays/floot.html

https://www.tutorialspoint.com/object_oriented_analysis_design/ooad_testing_quality_assurance.htm

From the blog CS@Worcester – Site Title by nealw5 and used with permission of the author. All other rights reserved by the author.

Thread testing

Thread testing is an early system integration testing phase to verify key functionalities. Atomic System Function, ASF, is a system to show input and output event. Since ASF have port event as output and input, it shows a sequence of input and output event. This is used to represent the seams between integration and system testing. ASF graphs represent the system by showing which nodes are ASF and edges represent sequential flow.  Source ASF shows as a source node while Sink ASF shows as a sink node. System thread links a source ASF to a sink ASF.

With thread testing, we can unify the three level if testing. Unit testing tests individual functions. Integration testing examines interactions among units, and system testing examines the interactions between the ASF.

 

http://www.softwaretestingstuff.com/2007/10/thread-based-integration-testing.html

http://www.guru99.com/thread-testing.html

From the blog CS@Worcester – Site Title by nealw5 and used with permission of the author. All other rights reserved by the author.

Mock Testing

Mock object testing is an interesting way to test special cases that mimic real objects for testing. The three phases of testing are expectation, exercise, and verification. Mock object testing is just one of the many testing doubles. There is dummy, in which objects are passed around but never used. There are Fake, where objects have working implementations, but have shortcuts for productions.  Stubs provides canned answers to calls made during the test. Then there is Mocks where it is objects preprogrammed with expectations on what input to receive. Mock uses behavior verification in where we check to see if the order made the correct calls. Unlike other testing methods in which they use state verification, in where we determine the method by examining the state after the method was executed.

 

 

http://martinfowler.com/articles/mocksArentStubs.html

https://msdn.microsoft.com/en-us/library/ff650441.aspx

https://jtreminio.com/2013/03/unit-testing-tutorial-part-4-mock-objects-stub-methods-dependency-injection/

From the blog CS@Worcester – Site Title by nealw5 and used with permission of the author. All other rights reserved by the author.

Lambdas vs. Closures

At one point in every persons life they’ve asked themselves the question.. What’s the difference between a lambda and a closure! Okay I admit maybe not everyone asks this questions but certainly I did a few days back. I was working on a project that kept referring to the use of closures and to me they looked a lot like lambda functions. I did a little googling and stumbled across this blog post.

The blog post went into depth about what a lambda is and what a closure is and the difference. Come to find out, they are extremely similar hence why I thought all those Closures looked like a lambda.

The main difference between the two is the fact that Closures can access variables outside of the scope that it was created which becomes incredibly powerful in certain circumstances.

From the blog CS@Worcester – Tyler Lundstrom by CS@Worcester – Tyler Lundstrom and used with permission of the author. All other rights reserved by the author.

What is Reasonable Test Coverage?

Earlier this week I was reading through some blogs and stumbled across this particular piece that I found highly amusing but answered a question that I had been looking for an answer.

I found this article called The way of Testivus. It’s essential Confucius meets programming. While reading through and chuckling at most of the things mentioned on this page I stopped being side tracked and continued to see if I could find a good answer to my question – What is a reasonable amount of test coverage? As I continued to google I landed back onto the artima.com forums and found there was the question I had been searching for. Funny enough the writer of the “The way of Testivus” replied with an answer to this poster’s questions

Testivus On Test Coverage
Early one morning, a programmer asked the great master:

“I am ready to write some unit tests. What code coverage should I aim for?”
The great master replied:

“Don’t worry about coverage, just write some good tests.”
The programmer smiled, bowed, and left.

…

Later that day, a second programmer asked the same question.

The great master pointed at a pot of boiling water and said:

“How many grains of rice should put in that pot?”
The programmer, looking puzzled, replied:

“How can I possibly tell you? It depends on how many people you need to feed, how hungry they are, what other food you are serving, how much rice you have available, and so on.”
“Exactly,” said the great master.

The second programmer smiled, bowed, and left.

…

Toward the end of the day, a third programmer came and asked the same question about code coverage.

“Eighty percent and no less!” Replied the master in a stern voice, pounding his fist on the table.
The third programmer smiled, bowed, and left.

…

After this last reply, a young apprentice approached the great master:

“Great master, today I overheard you answer the same question about code coverage with three different answers. Why?”
The great master stood up from his chair:

“Come get some fresh tea with me and let’s talk about it.”
After they filled their cups with smoking hot green tea, the great master began to answer:

“The first programmer is new and just getting started with testing. Right now he has a lot of code and no tests. He has a long way to go; focusing on code coverage at this time would be depressing and quite useless. He’s better off just getting used to writing and running some tests. He can worry about coverage later.”

“The second programmer, on the other hand, is quite experience both at programming and testing. When I replied by asking her how many grains of rice I should put in a pot, I helped her realize that the amount of testing necessary depends on a number of factors, and she knows those factors better than I do – it’s her code after all. There is no single, simple, answer, and she’s smart enough to handle the truth and work with that.”
“I see,” said the young apprentice, “but if there is no single simple answer, then why did you answer the third programmer ‘Eighty percent and no less’?”

The great master laughed so hard and loud that his belly, evidence that he drank more than just green tea, flopped up and down.

“The third programmer wants only simple answers – even when there are no simple answers … and then does not follow them anyway.”
The young apprentice and the grizzled great master finished drinking their tea in contemplative silence.

 

In my early stage as a programmer I decided I am going to dedicate myself to not best understanding what I should be looking for in code coverage but better understanding how I can get there with quality tests.

From the blog CS@Worcester – Tyler Lundstrom by CS@Worcester – Tyler Lundstrom and used with permission of the author. All other rights reserved by the author.

Creating Tests with Laravel

Laravel, Artisan and Testing

By: Tyler Lundstrom

The past few weeks I have been working on a project using the Laravel PHP framework. So far I love it and it has increased my abilities and knowledge for developing PHP immensely. One of the many great things about Laravel is it’s Artisan tool. Laravel’s Artisan tool is used to to create a lot of the boiler plate code for you as well as put the generated files in the proper repositories.

The command I’d  like to talk about today is php artisan make:test this command when given a name will auto generate the test boiler plate you need to running unit tests in Laravel. This saves you time from having to manual type out all the files you are using as well as the class name and extensions. As a side note about the extension, you extend a class called TestCase which is an abstract class that has many of the boiler plate style syntax already filled out and you simply just extend upon that.

Once your file is created and you are ready to start creating your tests writing PHPunit is now as simple as creating jUnit code.

public function testExample(){ $this->assertTrue(true); }

That’s all you need to know about testing with Laravel. Thank you Taylor Otwell for making PHP development a delight!

From the blog CS@Worcester – Tyler Lundstrom by CS@Worcester – Tyler Lundstrom and used with permission of the author. All other rights reserved by the author.