Hi Daan,
As I am aware of till now you cannot have visibility of a button based on environments. ATM you can only select visibility based on user role or attribute. It will be nice to have visibility based on constants as well and may be this can be added into idea form.
Another thought in addition to Mike's suggestion could be to add a constant.
The way I do to work around this issue is;
Note: If you don't want to use two pages then you can have one page where users can see the buttons but you can add a check in the microflow of that button to check the value of IsProduction constant and if true display a message saying this functionality is for test purposes only and in test environments you can configure the value for IsProduction to false which will allow you to use the functionality.
There might be a better way of doing this which I am not aware of but as of now i use this approach.
Hope this helps!
A couple of thoughts:
These buttons and the associated microflows are permission controlled, I am assuming. If so, you could create a User Role specifically for testing and only assign that user role to users in your development environment (and other environments like test, acceptance, etc.) Then make the buttons and microflows accessible only to users with that role.
Another approach is to use the IsInDevelopment java action from Community Commons at the beginning of your microflow. If the response from that java action is true, then proceed with the microflow activities, otherwise show the user a message box indicating that the microflow can't be run in a production environment.
Can't this be solved (assuming you are also the only person that require's these buttons) with simple security?