Better development flow?

We recently upgraded from sailpoint 7.3 to 8.2, and it has disrupted my development workflow, as well as killing off some of my ability to unit test locally.

Basically the way I’ve been developing beanshell scripts is to write them in actual java, then run junit tests against the java, followed by running a parser I wrote that converts the java class to text that is then run through the beanshell class included in the sailpoint libraries. Problem is, in the 8.x libraries, it seems that many sailpoint classes no longer implement java.io.Serializable, so I can no longer dump some objects from the server and then test against them locally. For example, I can’t dump ‘context’ to test my code against the server state.

Is there another way of doing this? I’m currently trying to dump using kryo but haven’t gotten it fully working yet (haven’t worked out how to get it to ignore objects retrieved using org.hibernate.)

2 Likes

If you are looking for a test suite for your beanshell and java code then you could use the JUnit helper classes in the SSD:

https://community.sailpoint.com/t5/Services-Standard-Deployment/SST-JUnit-IdentityIQ-Helper/ta-p/76822

You can use the Developer Deployment Accelerator, which is a pluign in Eclipse IDE to allow you to develop Beanshell rules (with type-ahead lookups etc) and hot deploy to your IdentityIQ instance. It integrates with the SSB so target mappings can be respected etc.

https://community.sailpoint.com/t5/Deployment-Accelerator-Knowledge/IdentityIQ-Deployment-Accelerator/ta-p/73255

Finally, if you wish to remote in your servers without having to get a SailPointContext, there is the DevSAK Console tool which allows remote access, debugging features and remote log tracing:
https://community.sailpoint.com/t5/Professional-Services/IdentityIQ-Developer-Swiss-Army-Knife-DevSAK/ta-p/162518

I hope this helps.

I have multiple environments configured in the SSD, how does the junithelper know which one to connect to?

I’ve been developing a workflow based on writing beanshell code as a Java class and then converting it to the XML+bsh that IIQ understands. I’ve dropped a few hints here:

https://community.sailpoint.com/t5/IdentityIQ-Forum/Facing-issue-while-creating-a-Sailpoint-context-instance-for-a/m-p/211845/highlight/true#M164798

EDIT: It looks like, at least as of IIQ 8.2, and SSD v7, that JUnit helper class is broken because the SailpointExternalContext has a problem. Fortunately the source code is available, and it looks like it fails right here:

				method = springStarter.getClass().getMethod(
						"addSuppressedServices", String.class);

That “addSuppressedServices” method isn’t there. Maybe it was removed in a previous version? I’m not sure. But based on how it gets initialized I think I might be able to come up with my own means of doing so.

EDIT 2: Looks like it has been replaced by just “springStarter.suppressSchedulers()” to hit all of them at once?

Hello Justin,

I have come across your thread by sheer coincidence as I’m about to face similar issues in the context of a 7.2 → 8.2 migration.

Have you looked into springStarter.addWhitelistedService(java.lang.String) && springStarter.setWhitelistedServices(java.lang.String[]) which appeared at about the same time addSuppressedService/setSuppressedServices have disappeared? :grin:

Alternatively, have you made any progress on this issue since?

I’ll keep you up to date if anything new pops on my side.

Best regards,

@jjdecker
Yes, The Junit Helper does need modifying for 8.2, I’m sure there is a PR for this so I will check but you’re right about the change in code.

How the JUnit help knows which instance to use, is based on the iiq.properties it uses when you point your Eclipse IDE to the IdentityIQ classes folder (it will pick up the iiq.properties there), it should be in the documentation.