Different triggers for different executable tasks in the same project - cruisecontrol.net

Is it possible in any way to have different triggers for different executable tasks within the same project?
For example: I've got several .bat-scripts that shall be run in different intervals.
Some once every 2 hours, some once a day and some only weekly.
I haven't figured out yet if it's possible to have this in only one project since i want to avoid splitting them all up into their own projects in order to keep the CCTray clearly arranged.
Does anyone have an idea how i can achieve the described result within one project?

I managed to do it now, here is what i did:
I created several parameter triggers which all pass a different parameter and added conditions to all my tasks. Due to that i achieved what i wanted because each task only runs if the specific parameter trigger was activated and the corresponding value is set. I chose named values as parameters and compare values as condition.

No this isn't possible. The smallest triggerable component is a project.
For this you would need to break your project into smaller ones.

Related

Is there a generic dag/task can be written in Airflow?

Detailed question: I have a scenario in my mind, and would like to take a suggestion from experts!
in the attached image, first set of image shows current workflow. below is the expected workflow. I can't combine all the workflows into one dag due to different source data refresh time.
I was thinking like, is it possible to create one dag named generic and use the individual tasks in other child dags like templates?
or, how can i call these generic dags from my child dags?
looking for your valuable suggestion to make the work flow optimised and easy to maintain when any update needed in extract and load part. as of now, its really complex as I need to touch all the 4 dags individually!

Gherkin: Is it correct to repeat steps?

I am reading a lot about Gherkin, and I had already read that it was not good to repeat steps, and for this it is necessary to use the keyword "Background", but in the example of this page they are repeating the same "Given" again and again, Could it be that I am doing wrong? I need to know your opinion about it:
Like with several things, this a topic that will generate different opinions. On this particular example I would have moved the "Given that I select the post" to the Background section as this seems to be a pre-requisite to all scenarios on this feature. Of course this would leave the scenarios in the feature without an actual Given section but those would be incorporated from the Background section on execution.
I have also seen cases where sometimes the decision of moving steps to the Background is a trade-off between having more or less feature files and how these are structured. For example, if there are 10 scenarios for a particular feature with a lot of similar steps between them - but there are 1 or 2 scenarios which do not require a particular step, then those 1 or 2 scenarios would have to moved into a new feature file in order to have the exact same steps on the Background section of the original feature.
Of course it is correct to keep the scenarios like this. From a tester's perspective, the Scenarios/Test cases should run independently, therefore, you can keep these tests separately for each functionality.
But in case you are doing an integration testing, then some of these test cases can be merged, thus you can cover multiple test cases in one scenario.
And the "given" statement is repeating, therefore you can put that in the background, so you don't have to call it in each scenarios.
Note: These separate scenarios will be handy when you run the scripts separately with annotation tags, when you just have to check for a specific functionality, or a bug fix.

Scenario to display multiple attributes on the page

Begging a pardon in advance for a newbie question.
I'm writing a feature where visitor of the page should see several attributes of an item.
The question is shall I add a separate feature for each attribute or separate scenarios of the same feature or create a single column table in then clause listing all attributes that should be displayed?
I'd put all of the assertions in the same scenario unless there's a good reason to separate them. It would take a lot longer to run if it has to get to the page to assert on multiple times.
The decision to use multiple 'Then ...' lines or to use a table is mainly a matter of personal taste as both will work. Personally if there are only a couple of assertions then I just use multiple Then lines, but if there are more than that I use a table.

How to implement If condition in Cucumber Scenarios

I have a specific scenario as follows:
if (element shows up on UI)
validate it
else
no harm done; move on...
If I know upfront if the element shows up or not, I can frame two different scenarios, when the element shows up and when not.
But, in this case, it may or may not be present. If it is present, it should function as expected.
Any suggestions on how this can be implemented in a Cucumber scenario(s) ?
I am using Cucumber-jvm.
You have two separate scenarios, you just need to be able to make sure you setup the preconditions to assume one scenario vs the other.
In general, you should not be implementing a conditional inside a single scenario, because your intent is to test two scenarios.

Using Cucumber, how do I specify a condition that must hold after every step?

I am new to Cucumber and BDD. I was wondering if there is a good way to specify a condition that must be checked after every step. For example, suppose I want to make sure a particular variable x is equal to 5 after every step. I do not want to write the scenario like this:
When something happens
Then x should be 5
When something else happens
Then x should be 5
And so on...
Is there a less repetitive way of accomplishing this? I am aware of Background and hooks, but these seem to be for setting up the environment rather than verification.
Use the AfterStep-hook (see https://github.com/cucumber/cucumber/wiki/Hooks). This code will run after every step.
Alternatively you can decorate the scenarios with tags an just have the hook run for after steps in the tagged scenarios

Resources