This project also contains my notes about Redmine Plugin Development but in Turkish ;)
To retrieve Kiwi Test Cases from Kiwi server there will be needed to define all the settings in plugin settings page.
This plugin creates a relation between Kiwi tests and issues. To make this relation both creating or editing issue you can add tests to the issue.
When the issue has tests and is associated with any code change this plugin creates Test Results tab at the end of tabs below of the page. This tab contains revisions and tags related with code revisions. When any tag contains description like below, all artifacts extracts by plugin in tag description and looks for this artifact names in kiwi test run's tags.
distros:
- package: cnrpcfoms-vnf
version: 1.2.0-1-ba02a366
packageType: debian
kernel: 4.4.0-210-generic
distribution: Ubuntu 16.04.7 LTS
urgency: low
artifacts:
- cnrpcfoms-vnf_1.2.0-1-ba02a366_amd64.deb
- package: cnrpcfoms-cnf
version: 1.2.0-1-ba02a366
packageType: debian
kernel: 4.4.0-210-generic
distribution: Ubuntu 16.04.7 LTS
urgency: low
artifacts:
- cnrpcfoms-cnf_1.2.0-1-ba02a366_amd64.deb
- registry.ulakhaberlesme.com.tr/cinar/pcf/oms:1.2.0-1-ba02a366
Rails.logger.debug "Debug level message"
Rails.logger.info "Info level message"
Rails.logger.warn "Warning level message"
Rails.logger.error "Error level message"
Rails.logger.fatal "Fatal level message"
def send_confirmation_email(user)
# Send confirmation email code
Rails.logger.info "Confirmation email sent to #{user.email}"
end
def process_order(order)
if order.items.empty?
Rails.logger.warn "Order #{order.id} has no items"
end
# Process order code
end
def divide(a, b)
begin
result = a / b
rescue ZeroDivisionError => e
Rails.logger.error "Error dividing #{a} by #{b}: #{e.message}"
result = nil
end
return result
end
def destroy_user(user)
if user.admin?
Rails.logger.fatal "Attempted to destroy admin user #{user.id}"
raise "Cannot destroy admin user"
else
# Destroy user code
end
end
def some_method(param)
if param.nil?
Rails.logger.unknown "Param is nil, using default value"
param = "default"
end
# Method code
end
Kaynaklar: