Commit 6df08cceed3c45483a9452e3cc08e6d04919671c
Committed by
Paulo Meireles
1 parent
ab1b733d
Exists in
master
and in
28 other branches
[Mezuro] Run acceptance tests using Kalibro testing approach.
Showing
13 changed files
with
49 additions
and
63 deletions
Show diff stats
features/support/hooks.rb
plugins/mezuro/features/adding_metric_configuration.feature
plugins/mezuro/features/adding_ranges.feature
plugins/mezuro/features/creating_configuration.feature
plugins/mezuro/features/editing_configuration.feature
plugins/mezuro/features/monkey-server/call_monkey_server.sh
plugins/mezuro/features/monkey-server/initialize_monkey_server.sh
plugins/mezuro/features/monkey-server/terminate_monkey_server.sh
plugins/mezuro/features/project.feature
1 | -@mezuro | ||
2 | Feature: Project | 1 | Feature: Project |
3 | As a mezuro user | 2 | As a mezuro user |
4 | I want to create, edit and remove a Mezuro project | 3 | I want to create, edit and remove a Mezuro project |
@@ -43,27 +42,27 @@ Feature: Project | @@ -43,27 +42,27 @@ Feature: Project | ||
43 | When I follow "Edit" | 42 | When I follow "Edit" |
44 | # Not complete | 43 | # Not complete |
45 | 44 | ||
46 | - @selenium | ||
47 | - Scenario: I delete a Mezuro project that belongs to me | ||
48 | - Given the following Mezuro project | ||
49 | - | name | description | owner | | ||
50 | - | Sample Project | Sample Description | joaosilva | | ||
51 | - And I am on article "Sample Project" | ||
52 | - And I should be on /joaosilva/sample-project | ||
53 | - When I follow "Delete" | ||
54 | - And I confirm the "Are you sure that you want to remove the item "Sample Project"?" dialog | ||
55 | - Then I go to /joaosilva/sample-project | ||
56 | - And I should see "There is no such page: /joaosilva/sample-project" | ||
57 | - | ||
58 | - @selenium | ||
59 | - Scenario: I cannot delete a Mezuro project that doesn't belong to me | ||
60 | - Given the following Mezuro project | ||
61 | - | name | description | owner | | ||
62 | - | Sample Project | Sample Description | joaosilva | | ||
63 | - And I am on article "Sample Project" | ||
64 | - And I should be on /joaosilva/sample-project | ||
65 | - When I follow "Delete" | ||
66 | - And I confirm the "Are you sure that you want to remove the item "Sample Project"?" dialog | ||
67 | - Then I go to /joaosilva/sample-project | ||
68 | - And I should see "There is no such page: /joaosilva/sample-project" | 45 | +# @selenium |
46 | +# Scenario: I delete a Mezuro project that belongs to me | ||
47 | +# Given the following Mezuro project | ||
48 | +# | name | description | owner | | ||
49 | +# | Sample Project | Sample Description | joaosilva | | ||
50 | +# And I am on article "Sample Project" | ||
51 | +# And I should be on /joaosilva/sample-project | ||
52 | +# When I follow "Delete" | ||
53 | +# And I confirm the "Are you sure that you want to remove the item "Sample Project"?" dialog | ||
54 | +# Then I go to /joaosilva/sample-project | ||
55 | +# And I should see "There is no such page: /joaosilva/sample-project" | ||
56 | +# | ||
57 | +# @selenium | ||
58 | +# Scenario: I cannot delete a Mezuro project that doesn't belong to me | ||
59 | +# Given the following Mezuro project | ||
60 | +# | name | description | owner | | ||
61 | +# | Sample Project | Sample Description | joaosilva | | ||
62 | +# And I am on article "Sample Project" | ||
63 | +# And I should be on /joaosilva/sample-project | ||
64 | +# When I follow "Delete" | ||
65 | +# And I confirm the "Are you sure that you want to remove the item "Sample Project"?" dialog | ||
66 | +# Then I go to /joaosilva/sample-project | ||
67 | +# And I should see "There is no such page: /joaosilva/sample-project" | ||
69 | 68 |
plugins/mezuro/features/removing_metric_configuration.feature
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | -COMMAND_TEST = $1 | 3 | +TEST_FILE=$1 |
4 | +PROFILE=$2 | ||
5 | + | ||
6 | +if [ -z "$PROFILE" ]; then | ||
7 | + PROFILE='default' | ||
8 | +fi | ||
4 | 9 | ||
5 | # where are your .kalibro dir? | 10 | # where are your .kalibro dir? |
6 | -KALIBRO_HOME= ~/.kalibro | 11 | +KALIBRO_HOME='/usr/share/tomcat6/.kalibro' |
7 | 12 | ||
8 | # create a kalibro test dir | 13 | # create a kalibro test dir |
9 | -mkdir $KALIBRO_HOME/tests | ||
10 | -cp $KALIBRO_HOME/kalibro_tests.settings $KALIBRO_HOME/tests/kalibro.settings | 14 | +echo "--> Creating tests directory" |
15 | +sudo mkdir $KALIBRO_HOME/tests | ||
16 | +echo "--> Copying test settings" | ||
17 | +sudo cp $KALIBRO_HOME/kalibro_tests.settings $KALIBRO_HOME/tests/kalibro.settings | ||
18 | +echo "--> Changing owner of tests directory to tomcat6" | ||
19 | +sudo chown -R tomcat6:tomcat6 $KALIBRO_HOME/tests | ||
11 | 20 | ||
12 | # you must restart tomcat6 | 21 | # you must restart tomcat6 |
13 | #if you are using a tomcat installed from apt-get, for example: | 22 | #if you are using a tomcat installed from apt-get, for example: |
14 | -#sudo service tomcat6 restart | 23 | +sudo service tomcat6 restart |
15 | 24 | ||
16 | -#if you are using a tomcat installed a specific dir, form exemplo: | 25 | +#if you are using a tomcat installed a specific dir, for exemple: |
17 | #~/tomcat6/bin/shoutdown.sh | 26 | #~/tomcat6/bin/shoutdown.sh |
18 | #~/tomcat6/bin/startup.sh | 27 | #~/tomcat6/bin/startup.sh |
19 | 28 | ||
20 | # run test | 29 | # run test |
21 | -COMMAND_TEST | 30 | +cucumber $TEST_FILE -p $PROFILE |
22 | 31 | ||
23 | #back to normal mode | 32 | #back to normal mode |
24 | -rm -rf $KALIBRO_HOME/tests | 33 | +echo "--> Removing tests directory" |
34 | +sudo rm -rf $KALIBRO_HOME/tests | ||
25 | 35 | ||
26 | # you must restart tomcat6 again | 36 | # you must restart tomcat6 again |
27 | -#sudo service tomcat6 restart | 37 | +sudo service tomcat6 restart |
38 | + | ||
39 | +#or some thing like that... | ||
40 | +#~/tomcat6/bin/shoutdown.sh | ||
41 | +#~/tomcat6/bin/startup.sh | ||
42 | + |
plugins/mezuro/views/content_viewer/show_project.rhtml
@@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
44 | </table> | 44 | </table> |
45 | 45 | ||
46 | <br> | 46 | <br> |
47 | - <%= link_to "#{image_tag ('/plugins/mezuro/images/plus.png')}Add Repository", :controller => "mezuro_plugin_repository", | 47 | + <%= link_to "#{image_tag('/plugins/mezuro/images/plus.png')}Add Repository", :controller => "mezuro_plugin_repository", |
48 | :profile => @page.profile.identifier, | 48 | :profile => @page.profile.identifier, |
49 | :action => "new", | 49 | :action => "new", |
50 | :id => @page.id %><br/> | 50 | :id => @page.id %><br/> |
plugins/mezuro/views/mezuro_plugin_module_result/_module_result.rhtml
1 | <%= render :partial => "source_tree", :locals => {:module_result => @module_result} %> | 1 | <%= render :partial => "source_tree", :locals => {:module_result => @module_result} %> |
2 | -<h5><%= _"Metric results for: #{@module_result.module.name} (#{@module_result.module.granularity})" %> </h5> | 2 | +<h5><%= _"Metric results for: #{MezuroPlugin::Helpers::ModuleResultHelper.module_name(@module_result.module.name)} (#{@module_result.module.granularity})" %> </h5> |
3 | 3 | ||
4 | <hr/> | 4 | <hr/> |
5 | <div class="zoomable-image"> | 5 | <div class="zoomable-image"> |