📜 ⬆️ ⬇️

Flash Builder 4 and unit tests

I was pleasantly surprised that now the creation of unit tests takes a few moments.
So, I will briefly tell you and show you how to write unit tests in Flash Builder 4.

This is not even an article, but just a description of a few simple steps.

Go!
')

Process:



Create a simple project:
image

It has the simplest code:
image

And now the tests for him! File -> New -> Test Case Class
image

We drive in the name and press to choose a class for testing:
image

Choose, add. We register the simplest test:
[Test]
public function testSimpleFunction (): void {
assertEquals (3, this.target.simpleFunction (1,2));
}

Now right-click on our project and click on Execute Flex Unit Tests:

image

Walla!
image

Negative:


The browser opens with the results, then switches back to Flash Builder, but it opens the console instead of the test results. Perhaps only on poppy seeds, but the impression is spoiled.

Source: https://habr.com/ru/post/89487/


All Articles