Test a 5G core upgrade before it reaches the network
Run the same 5G procedures against the current and the upgraded core, compare verdicts step by step, and sign off on exit codes, not on logs.
A core upgrade is a new AMF, SMF or UPF build, a new vendor drop, or a configuration change that touches every subscriber. The release notes say what changed. They do not say what broke. Before the upgrade goes near live traffic, someone has to show that the procedures your subscribers depend on still complete, and that the ones that should fail still fail the same way.
Runik turns that sign-off into a run you can repeat. You keep a set of flows, run it against the current core and against the upgraded one, and compare two verdicts instead of two piles of logs.
The problem with upgrade testing today
Upgrade testing tends to be a lab week. Engineers attach test UEs, walk through the procedures they remember, read traces, and write a summary. It works, but it has three weaknesses:
- It is not repeatable. The next upgrade gets a different set of checks, run by different people.
- It is not comparable. A trace from the old build and a trace from the new build are hard to diff by eye.
- It does not define pass. "Looks fine" is a judgement, and judgements do not survive the next incident review.
How it works
- Pin a baseline. Pick the flows that matter for this network from the catalog (registration, PDU session, service request, handover, the negative cases you care about) and keep them in git with your lab config.
- Run against the current core. Record the JSON verdicts. This is the behaviour you are about to change.
- Run against the upgraded core. Same flows, same subscribers, same config apart from the target address. Compare the verdicts flow by flow and step by step.
If a flow passed before and fails after, the report names the step and the check that failed. Add -trace and the failed run hands back the bytes sent and received, down to the information element.
What a verdict looks like
Each flow declares what it must prove. The JSON verdict reports every check by name, so a before and after comparison is a diff of named results:
final_checks:
- name: and no REGISTRATION REJECT arrived
metric: rx_events.NASDownlinkTransport.RegistrationReject
op: equals
value: 0
{ "flow_name": "registration", "verdict": "fail", "all_passed": false,
"final_checks": [ { "name": "and no REGISTRATION REJECT arrived", "pass": false } ] }
Exit 0 is a pass, exit 1 is a failed check or an error, exit 2 is a usage error, and exit 3 means the core does not implement the scenario while the checks that ran passed. For sign-off, treat 1 and 2 as blocking and review every 3.
What to put in an upgrade baseline
A useful baseline covers the procedures your subscribers hit every day, plus the edges an upgrade tends to move:
- Attach path: registration with 5G AKA, security mode, initial context setup, then registration complete.
- Sessions: PDU session establishment, modification and release, with the DNNs and slices you deploy, including multiple PDU sessions and IPv4, IPv6 and IPv4v6 where you use them.
- Idle and back: UE context release, then service request.
- Mobility: single-hop N2 handover and Xn path switch.
- Interface: NG Setup, NG Reset and RAN configuration update, so a change on the AMF side of N2 is caught before any UE attaches.
- Expected failures: flows that expect a specific reject or cause. An upgrade that changes error handling is a regression too, even when the happy path still passes.
rk check probes SCTP and NG Setup for each gNB and AMF pair in your config, so you can confirm the upgraded core is reachable before the baseline starts.
Load from the same flows
Correctness first, then load. Rate, repetitions and duration are flags or suite keys on the same flows, and latency percentiles (p50, p95, p99) are metrics you assert in YAML. A latency regression in the new build then fails the run instead of hiding in a chart. Pro adds test suites for composed campaigns.
Beyond N1 and N2
If the upgrade touches the user plane or the EPC interworking side, Pro adds advanced procedures on PFCP (N4) and Diameter. With PFCP, rk can play the SMF on N4 and the gNB on N3 for a UPF, with no AMF, so a UPF upgrade can be tested on its own. See editions.
Runs where the upgrade is staged
Upgrade labs are often isolated from the internet. Runik is one Linux binary. It runs offline, checks a signed licence file locally when you use a paid edition, and sends no telemetry. See air-gapped 5G core testing.
Keep the baseline running
Once the baseline exists, it does not have to wait for the next upgrade. Put the same flows in your pipeline and every change gets the same check. See 5G core regression testing in CI.
Start
Install Community with curl -fsSL https://get.dflux.io/runik/install.sh | sh, clone the catalog, and run the baseline against your current core today. You will have the "before" half of your next upgrade sign-off. If your upgrade needs PFCP, Diameter or suites, talk to an engineer.