All Apps and Add-ons

Subject: Local Testing of Splunk Add-on Upgrade

TestUser
Loves-to-Learn

I’ve already released a Splunk Add-on with one input and user configurations. Now, I’ve added a new input and made UI changes in the Configuration page.

I want to simulate a customer upgrade locally by:

  1. Installing the existing released version

  2. Adding sample configurations

  3. Upgrading it with the new version

  4. Testing if existing settings are retained and the new input/UI works without issues

Could you guide me on:

  • Best practices for local upgrade testing

  • Ensuring configurations persist after upgrade

  • Any tools or logs to verify migration behavior

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @TestUser ,

I don't know of any best practices for such a check, the only advice I can give you is to use common sense:
follow the procedure you indicated that seems correct to me:

  • verify (if you haven't already done so) that before the upgrade there are no parsing and normalization problems,
  • if possible, use a data set that you have already acquired with the old version of the add-on,
  • at the end, don't just check that the data parsing is correct, but also check that the normalization rules that the add-on must have if it is CIM compliant (otherwise it is not relevant) are correctly applied (eventtype, tags and fields.

About tools, I usually use the SA_CIM-Vladiator app (https://splunkbase.splunk.com/app/2968) to check the normalization status but there are also other tools to check the CIM compliance of a data flow.

Ciao.

Giuseppe

0 Karma

livehybrid
Super Champion

Hi @TestUser 

Different developers have different approaches to dealing with some of these techniques. 

I start by using a local docker instance for testing against various versions of Splunk (e.g. currently supported versions), but it depends on how big the changes made in the upgrade actually are.

Changes you make in the UI will persist in the local directory, therefore if a user upgrades the app you should find that this local directory persists and the other folders get updated. Its therefore important to ensure that when you update your app that you dont change something which might be impacted by someone's local configuration.

Are you using a framework such as UCC to build your app? If so there are UI testing options available (e.g. see https://splunk.github.io/addonfactory-ucc-generator/ui_tests_inputs_page/) and I would also recommend checking out https://splunk.github.io/pytest-splunk-addon/ which is really powerful for performing testing automatically without human interaction. 

Ultimately, depending on your app and what you are changing you might find varying appropriate options, but these are my two favourites - although I dont use them on all apps all of the time.

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

0 Karma
Get Updates on the Splunk Community!

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...

From Alert to Resolution: How Splunk Observability Helps SREs Navigate Critical ...

It's 3:17 AM, and your phone buzzes with an urgent alert. Wire transfer processing times have spiked, and ...