#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.

Announcement Olga Zavrazhnova · Mar 15, 2024

Hi Developers,

Join us at the upcoming Developer Roundtable on March 26th at 11 am ET | 4 pm CET. 📍
We will have 2 topics covered by the invited experts and open discussion as always! 

Talks:

➡ Demo on Documenting and Testing REST Call's by generating documentation and making scenario's for integration tests - presented by @Danny Wijnschenk , Application Developer, Winfo.
Danny is an independent developer based in Belgium, specialized in InterSystems Caché and IRIS. He has customers in both the healthcare and non-healthcare sectors.

0
0 181
Article Evgeny Shvarov · May 7, 2020 4m read

Hi Developers!

I want to share with you the approach you can use working with Unit Testing which I personally find very convenient and robust.

Will not talk much here about Unit Testing, we have documentation, enough good articles on the topic not only on the Internet but here on Developers Community too,  e.g. this one.

How can you manage the Unit Testing of your ZPM module?

This is pretty handy with ZPM. It has a special command "test" which runs all the tests you mentioned in the module. You can execute it as shown below:

zpm:USER>module-name test
5
3 766
Announcement Olga Zavrazhnova · Feb 8, 2024

Hi Developers,

Our first Online Developer Roundtable of 2024 will take place on March 5th at 9 am ET | 3 pm CET. 

Tech talks:

  1. ObjectScript Unit Testing Tools, Techniques and Best Practices - by @Timothy Leavitt , Development Manager, Application Services, InterSystems
  2. Monitoring and Alerting Capabilities of InterSystems IRIS - by  @Mark Bolinsky , Principal Technology Architect, InterSystems Mark's presentation is rescheduled for the roundtable in April.

▶ Update: watch the recording of the roundtable below:

0
0 333
Article Luis Angel Pérez Ramos · Dec 29, 2023 6m read

It seems like yesterday when we did a small project in Java to test the performance of IRIS, PostgreSQL and MySQL (you can review the article we wrote back in June at the end of this article). If you remember, IRIS was superior to PostgreSQL and clearly superior to MySQL in insertions, with no big difference in queries.

Well, shortly after @Dmitry Maslennikov told me "Why don't you test it from a Python project?" Well, here is the Python version of the tests we previously performed using the JDBC connections.

6
3 867
Article Carlos Sepulveda Mancilla · Dec 8, 2023 3m read

Windows Subsystem for Linux (WSL) is a feature of Windows that allows you to run a Linux environment on your Windows machine, without the need for a separate virtual machine or dual booting. 

WSL is designed to provide a seamless and productive experience for developers who want to use both Windows and Linux at the same time**.

0
1 395
Question Colin Brough · Nov 13, 2023

We are successfully using System Default Settings to manage differences in settings across environments where the production and underlying code are otherwise identical. However, the TestingEnabled and LogGeneralTraceEvents settings don't appear to be settable via this mechanism. While we appear to be able to set them on the SDS page, they do not show up as selectable when resetting the settings on the Production Settings tab in the management portal - see screenshots below. Is there any way of managing these two settings so we can have development and test servers running with TestingEnabled

3
0 262
Article Daniel Aguilar · Nov 8, 2023 9m read

   

Hello, community!

After creating the app IrisApiTester, I saw that it could have more potential, and with some adjustments, it could become a powerful collaborative tool.

I asked myself a few questions::

  • Could the API collections be shared with the entire team?
  • Could I use it to perform unit tests?
  • Is it beneficial for integration tests??
  • What will happen if I add a CI/CD continuous integration layer??
0
3 464
Announcement Henrique Dias · Feb 12, 2023

Attention all developers!

Get ready to revolutionize your testing process with iris-tripleSlash, the ultimate unit test solution.

Say goodbye to boring and repetitive unit testing and hello to effortless and efficient testing.

With iris-tripleSlash, you can easily generate unit test cases using the power of automatic documentation.

2
0 298
Question Cedric Montanuy · Sep 1, 2023

Hello, 
as i'm trying to develop a operation and its methods (SQL adapter), I'm running into issues when i run my test class. 
I have the class i want to test in the very same folder as my test class. 
I followed the tutorial in the documentation. 
When i run the test class, i get the following message error : 
LogStateStatus:0::ERREUR #5002: Erreur Cache: <METHOD DOES NOT EXIST>zTestAdd+1^unitTests.testMyClass.1 *myMethod,Package.BO.MyClass  
Here is my test class (heavily inspired bythe documentation :-) :
 

Class unitTests.testSqlInscription Extends %UnitTest.TestCase

3
0 393
Article Daniel Aguilar · Jun 29, 2023 3m read

Hello Community!!

I just upload my lastest application "IRIS Api Tester" to the Open Exchange. 

It's a docker project with InterSystems IRIS + Newman that will allow you to test your Postman Collections in a quick and easy way..

It's ready to work out of the box, you just have to clone the repo: https://github.com/daniel-aguilar-garcia/irisapitester

Run the docker-compose file:

Open this url in your browser: 

http://localhost:52773/csp/user/index.html

Add some test to your Postman collection:

1
1 529
Article AndreClaude Gendron · Sep 19, 2017 1m read

It is with great pleasure that the CIUSSS de l'Estrie - CHUS is sharing the mocking framework it developed and presented at the InterSystems Summit 2017.  I will update this post with more detailed instructions in the next few weeks but I wanted to share the code and presentation quickly : 

https://gitlab.com/ciussse-drit-srd-public/Mocking-Framework

I hope you'll find this useful for your unit testing. We are using this extensively for the last 2 years and it really works well! The repo is public, feel free to submit enhancements!

14
1 2155
Article Daniel Aguilar · Jun 29, 2023 2m read

Hello Community!

I'm going to try to explain how to create test for Postman collections for use it with my app IRIS Api Tester.

Yet, What is Newman?:

Newman is a command-line tool that allows you to run Postman collections in an automated and scalable way. By creating tests in Newman, you can ensure the reliability and correctness of your API endpoints. In this article, we will explore how to create tests for Newman in Postman, along with practical examples to help you get started.

Once you have created your Postman Collection:

You're ready to start writing your test scripts:

0
0 359
Question Gautam Rishi · Jun 29, 2023

Hi All,
I was creating a unit test directory with the below script. But it not creating any directory as mentioned in code. I am working on MacBook with irisusr User as standard installation process.

if '$data(^UnitTestRoot) {

set mainFolder = "UnitTest\NewDir\"

set st = ##class(%File).CreateDirectoryChain(mainFolder _ testSuite)

if $$$ISOK(st) { set ^UnitTestRoot = mainFolder }

else {

write !, "UnitTestRoot folder could not be created. Consult with instructor."

do $system.Status.DisplayError(st)

}

}

2
0 296
Question Gautam Rishi · Jun 29, 2023

Getting INVALID OREF error while unit testing. Also ResultDyanmicObj.Headers.%Size(),DummyResponse.Headers.%Size() these are working fine getting 7 value from both. but still it is not working.

do $$$AssertEquals(ResultDyanmicObj.Headers.%Size(),DummyResponse.Headers.%Size(), "Validation for Headers")

error - INVALID OREF>TestAccountSearchWithoutAccount+6

1
0 345
Question Evgeny Shvarov · May 13, 2023

Hi folks!

Those who actively use unittests with ObjectScript know that they are methods of instance but not classmethods.

Sometimes this is not very convenient. What I do now if I face that some test method fails I COPY(!) this method somewhere else as classmethod and run/debug it.

Is there a handy way to call the particular unittest method in terminal?  And what is more important, a handy way to debug the test method?

Why do we have unittest methods as instance methods? 

25
0 671
Article Luis Angel Pérez Ramos · Jun 2, 2023 10m read

As a former JAVA developer it has always been a challenge to decide which database was the most suitable for the project we were going to develop, one of the main criteria I used was their performance, as well as their HA configuration capabilities ( high availability). Well, now is the time to put IRIS to the test with respect to some of the most commonly used databases, so I've decided to create a small Java project based on SpringBoot that connects via JDBC with a MySQL database, another of PostgreSQL and finally with IRIS.

5
0 575
Article Yuri Marx · May 29, 2023 7m read

Sometimes we need to know for sure if the current environment has sufficient cores, memory, and bandwidth to support the planned number of users and such SLAs as latency, response time, and availability. This is true for databases and backends. This is why it is mandatory for critical applications and databases to simulate the users simultaneous/concurrent requests and collect metrics about performance and availability.

0
2 625
Question Alexey Maslov · May 25, 2023

In elder versions of IRIS/Cache numeric overflow was detected during the syntax check: 

USER>w$p($p($zv,") ",2)," ("),!! s txt="-123.45E6789",s(0)=1,s(1)=" if ("_txt_")"zwritesw !,$compile(s,0,e),!! zwrite e
2021.1.1

s(0)=1s(1)=" if (-123.45E6789)"W$P($P($ZV,") ",2)," ("),!! S txt="-123.45E6789",s(0)=1,s(1)=" if ("_txt_")"ZW
RITE sW$COMPILE(s,0,e),!! ZWRITE e
       ^
<MAXNUMBER>

while in IRIS 2022.1 it is not:

5
0 196
Article Evgeny Shvarov · May 14, 2023 2m read

Hi Developers!

Often solutions with InterSystems IRIS BI can turn into a quite big solution with dozens of pivots and dashboards.

With every new IRIS BI solution release we can add changes that could influence the behavior of existing pivots or dashboards so they stop working. For example if we change the dimension or measure name, forget deploying some cubes or subject areas, conduct refactoring via mass renaming of cubes and its elements etc some widgets could stop functioning.

The solution is to test (manually?) every widget in every dashboard if the MDX queries are working.

3
1 337
Question Kari Vatjus-Anttila · Jan 28, 2023

Hello,

I read a great article by @Timothy Leavitt here, where he wrote about unit testing and test coverage with ZPM. I am facing a slight problem and was wondering if someone has some insight into the matter.

I am running my unit tests in the following way with ZPM, as instructed. They work well and test reports are generated correctly. Test coverage is also measured correctly according to the logs. However, even though I instructed ZPM to generate Cobertura-style coverage reports, it is not generating one. When I run the GenerateReport() method manually, the report is generated correctly.

3
1 347