SpringBoot: Making use of @Value properties from YAML files for Cucumber tests

In case you use:
1. SpringBoot to build your web applications using Java
2. Test it with Cucumber
3. Use YAML files for configurable property values

You can use the YamlPropertiesFactoryBean to make use of @Value for your test configuration.


    url: some_url

cucumber.xml (or application context .xml):

<context:component-scan base-package=""/>

    <bean id="yamlProperties"
        <property name="resources" value="classpath:application.yml"/>

    <context:property-placeholder properties-ref="yamlProperties"/>

Java code (snipped):

@ContextConfiguration(locations = {"classpath:cucumber.xml"})
public class TestSteps {

    private String baseUrl;

The spring bean, yamlProperties, will take care of all the necessary wiring, so all you have to do is make use of the @Value annotation. The benefit of this is you can create properties for various environments (in your YAML file) and be able to automate running your tests against any environment using spring profiles.

Hope this helps.

iOS: Remove broken and already-removed apps in Cydia Installed list

In case you installed a misbehaving app via Cydia, manually removed it using iFile or Filza, but can’t seem to remove it from the “Installed” list/section, here’s what you can do:

1. Using your preferred file manager — in my case, Filza — navigate to “/var/lib/dpkg/status”
2. View the app with “Text Editor”
3. Click anywhere inside the text, and click on “Edit” on the top-right
4. Search for “My3G” and delete the whole section (i.e. com.sull…)
5. Save and reboot your phone (not really needed, but it “feels” cleaner)

That’s it! Enjoy your jailbroken phone once again.