Creating a FloraScript File in SunflowerΒΆ
FloraScript is a simple scripting language built into Sunflower to help develop regression tests for Sunflower applications. These tests can also be a convenient way to validate Sunflower installation after each system update.
To build regression tests using FloraScript, we put FloraScript commands into a file which ends with a ”.fs” file extension, and then execute the file in Sunflower.
To carry this out in Sunflower, create a new file using the main navigation menu (File > New > File), as shown in Fig. 244.
Select the Sunflower Project you want to perform the regression tests for as the parent folder, and give a name ending with ”.fs” to the file. Fig. 245 shows the new FloraScript file family-regression-tests.fs having parent folder SunflowerProject1.
Click Finish and an empty family-regression-tests.fs file should appear in the Sunflower navigation window. Select the file and right click. The pop-up menu should have Execute FloraScript enabled, as shown in Fig. 246. This is the menu option for executing the regression tests in the file.
In the next section, we will use family-regression-tests.fs to build regression tests for the family application in SunflowerProject1.