예제 #1
0
 def test_get_last_20_tests_for_a_team_and_project_ordered_by_date_created_desc(self):
     LoadTestFactory.add_to_project(25, user=self.user, team=self.team, project=self.project)
     LoadTestFactory.add_to_project(5, user=self.user, team=self.team, project=self.team.projects[1])
     loaded_tests = list(LoadTest.get_by_team_and_project_name(self.team, self.project.name))
     expect(loaded_tests).to_length(20)
     for load_tests in loaded_tests:
         expect(load_tests.project_name).to_equal(self.project.name)
예제 #2
0
    def test_schedule_a_test_in_a_specific_branch(self):
        url = "/teams/%s/projects/%s/load_tests/" % (self.team.name, self.project.name)
        response = self.post(url, **{
            "base_url": "http://www.globo.com",
            "branch": "test-branch"
        })
        expect(response.code).to_equal(200)
        expect(response.body).to_equal("OK")

        tests = list(LoadTest.get_by_team_and_project_name(self.team, self.project.name))
        expect(tests).not_to_be_null()
        expect(tests).to_length(1)
        expect(tests[0].base_url).to_equal("http://www.globo.com")
        expect(tests[0].git_branch).to_equal("test-branch")
예제 #3
0
    def test_schedule_test(self):
        url = "/teams/%s/projects/%s/load_tests/" % (self.team.name, self.project.name)
        response = self.post(url, **{
            "base_url": "http://www.globo.com"
        })
        expect(response.code).to_equal(200)
        expect(response.body).to_equal("OK")

        tests = list(LoadTest.get_by_team_and_project_name(self.team, self.project.name))
        expect(tests).not_to_be_null()
        expect(tests).to_length(1)
        expect(tests[0].created_by.id).to_equal(self.user.id)
        expect(tests[0].project_name).to_equal(self.project.name)
        expect(tests[0].base_url).to_equal("http://www.globo.com")
        expect(tests[0].simple).to_be_false()
예제 #4
0
    def test_schedule_test(self):
        url = "/teams/%s/projects/%s/load_tests/" % (self.team.name,
                                                     self.project.name)
        response = self.post(url, **{"base_url": "http://www.globo.com"})
        expect(response.code).to_equal(200)
        expect(response.body).to_equal("OK")

        tests = list(
            LoadTest.get_by_team_and_project_name(self.team,
                                                  self.project.name))
        expect(tests).not_to_be_null()
        expect(tests).to_length(1)
        expect(tests[0].created_by.id).to_equal(self.user.id)
        expect(tests[0].project_name).to_equal(self.project.name)
        expect(tests[0].base_url).to_equal("http://www.globo.com")
        expect(tests[0].simple).to_be_false()
예제 #5
0
    def test_schedule_a_test_in_a_specific_branch(self):
        url = "/teams/%s/projects/%s/load_tests/" % (self.team.name,
                                                     self.project.name)
        response = self.post(
            url, **{
                "base_url": "http://www.globo.com",
                "branch": "test-branch"
            })
        expect(response.code).to_equal(200)
        expect(response.body).to_equal("OK")

        tests = list(
            LoadTest.get_by_team_and_project_name(self.team,
                                                  self.project.name))
        expect(tests).not_to_be_null()
        expect(tests).to_length(1)
        expect(tests[0].base_url).to_equal("http://www.globo.com")
        expect(tests[0].git_branch).to_equal("test-branch")