Patent attributes
Generation of a set of carbon-aware test cases based on a software resource load includes receiving, by one or more processors, a source code and identifying code changes on the received source code using code analysis technology. The code changes are used to select a plurality of code snippets from the source code. The one or more processors calculate metrics associated with an energy consumption of each of the plurality of code snippets and an amount of carbon dioxide emissions equivalent to the calculated metrics. The calculated equivalent amount of carbon dioxide emissions associated with each of the plurality of code snippets is displayed by the one or more processors on the source code for automatically generating the set of test carbon-aware test cases based on the calculated amount of carbon dioxide emissions and predefined carbon emissions constraints.