Junipers SRX is, by default, a stateful device. This means that it tracks the state of all the connections moving through the device. This requires writing firewall policy to allow traffic to flow through the device and can make it cumbersome to lab and test basic things. Juniper also offers the vMX and vQFX platforms that you can use for testing but they also have their own drawbacks, both of them are resource heavy and require two VMs to run one instance of the appliance and the appliances can take a very long time to boot and become ready.
When I need or want to test something basic like and OSPF or BGP configuration I will often deploy the vSRX but I will configure it for packet mode. This effectively disables the stateful features of the SRX and turns the device from a firewall to a router. This router isn’t as full-featured as the MX but 99% of the time is has everything I need to lab and test something. This is also great for those who enjoy their physical labs. Small SRXs can often be found on ebay for rather cheap.
To configure packet mode or packet-based forwarding configure the following:
configure
delete security
set security forwarding-options family inet mode packet-based
set security forwarding-options family inet6 mode packet-based
set security forwarding-options family mpls mode packet-based
set security fowarding-options family iso mode packet-based
commit
run request system reboot
After the device reboots you can validate that it is operating in packet mode using the command
show security flow status