#Testing

5 Followers · 131 Posts

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

Article Rodolfo Moreira dos Santos · Sep 25, 2024 3m read

Hi everyone,

In this article, I’m excited to introduce CodeInspector, a tool designed to simplify code validation by applying custom rules tailored to your development requirements. Whether you're managing a large codebase or working in an agile environment, CodeInspector helps ensure code quality by offering flexibility and adaptability to specific project needs.

Motivation

3
0 253
Question Thomas Haig · Jul 3, 2024

Trying to test a router that takes an XML input and performs a transform on it.First attempt I tried to test the transform using the XML Document Viewer via the Ensemble -> Interoperate -> XML Document Viewer menu. The transform itself is working however I can not get the output to save to a file. I've made sure permissions are set correctly on the file. It simply doesn't output anything and I'm at a loss as to why.As another method I also tried testing via Ensemble -> Test -> Business Hosts. Putting the file path/name as the source does not send any data. Again, I've made sure read

0
0 122
Question Colin Brough · May 9, 2024

We have a custom business service that is triggered by a scheduled task. The service queries a table, iterates over the result set and sends a message on to a business process for each result. Happy path functionality is all fine.

However, when there is an error detected in the business service code, neither throwing an exception nor returning an error %Status behaves as we'd expect.

1
0 188
Question James Rutledge · Apr 25, 2024

I'm trying to learn M programing for an Epic db class prerequisite. They said to download the IRIS Studio software to do the testing. I'm having a very difficult time finding information the language. I'm trying to run some examples that Epic has provided (like in below) but the compiler complains that it isn't valid. Of course, it doesn't tell you why it isn't valid.

r !,"Enter the hour: ",hr  
 r !,"Enter the minute: ",min 
 r !,"Enter the second: ",sec 
 s Mtime=$$ConvertToMTime(hr,min,sec)
 w !,"Equivalent M time: ",Mtime  
 q
ConvertToMTime(h,m,s)
 q (h*3600)+(m*60)+(s)

I get these errors:

8
0 318
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.

➡ Cypress for web application testing - presented by @Pravin Barton , Senior Applications Developer, InterSystems

▶ Update: watch the recording of the roundtable below.

  

4
0 225
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

And this command runs all the tests you mentioned in module.xml.

Let's see how it works.

5
3 826
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:

5
1 400
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 1003
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 482
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 346
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
4 556
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 357
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 447
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 620
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 2213
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 453
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 360
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 429
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 802
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 720