#Testing

0 Followers · 128 Posts

Software testing is an investigation conducted to provide stakeholders with information about the quality of the software product or service under test.

Question Rubens Silva · Jul 12, 2017

Greetings, can someone give me some help? I'm trying to use job for a instance method, as it's described here but...
Anyway, I have a method like this:

Method PrepareInstance(path){set ..Tool = ##class(Tool).%New(path)do $System.Event.Signal($zparent)}

That is being called like this:

Method TestPurge() As %Status{job ..PrepareInstance(..GetTestDirectory("../fixtures/_/dummy-project"))::10set msg = $System.Event.Wait("",10)
}

But it fails because:

<METHOD DOES NOT EXIST>zTestPurge+1^UnitTest.Tool.1 *PrepareInstance
5
0 498
Question Tirthankar Bachhar · Oct 20, 2016

Hi,

When we write unit test cases for cache object script code using %UnitTest.TestCase, what  is the best way to write code to identify code coverage?

So, let say my unit test case hit all 10 lines of code of a method for a given class. So, unit test coverage should be 100% for that. But, using line-by-line coverage [(%Monitor.System.LineByLine] getting wrong percentage, because it also includes code comment/documentation as part of code. So, practically we can not ever achieve 100% of code coverage by using this API.

2
0 903
Question Florence Cureau · Aug 26, 2016

Hello everyone,

Does anyone know how to create integration tests using the Cache unit test framework in order to test an Ensemble production?

For example, what would be the best way to create automated tests for a BPL that calls multiple business operations (SQL, WebService ...)?

Should we create some kind of mock service/operation to simulate the response from the business operations ? 

5
0 1179
Announcement Francis Galiegue · Apr 20, 2016

Hello community!

Heretofore is announced a new project which aims at providing a usable library for both running unit tests and collecting code coverage information at the same time:

https://github.com/litesolutions/cache-utcov

I shamelessly admit that this is my first project written in ObjectScript; the only source file right now barely loads a %Studio.Project instance on a given namespace and fails ungracefully on failure (it HALTs; meh); and even on success it will not even list the items correctly... Well, that's part of the learning curve.

14
0 696
Question Tiago Ribeiro · Feb 25, 2016

Good morning people.
The use of TDD is currently being reference for software delivery more confiabilitade and quality.

At the company I work developing web applications , we create tests for method class in a deteminado package and running the steps that the documentation recommends:

1 export the tests classes to a predefined folder.
2- And running the test ( D ## class (% UnitTest.Manager ) .RunTest (,"/nodelete" )

It is a lot of work to do the export and run these tests would have a resource that we could only run the tests without the need for export ?

5
0 827