first iteration tests ratev2

This commit is contained in:
nad 2019-03-13 16:32:59 +01:00
parent 40a2ed3916
commit d0eb5cd9c5
3 changed files with 86 additions and 18 deletions

View file

@ -717,9 +717,8 @@ class TestConnectivity(Test):
""" """
Test to check all this aspects related with functionality connections in devices Test to check all this aspects related with functionality connections in devices
""" """
# TODO name for SIM (3G) cellular_network = Column(Boolean)
celular_network = Column(Boolean) cellular_network.comment = 'Evaluate if cellular network works properly'
SIM.comment = 'Evaluate if SIM works'
wifi = Column(Boolean) wifi = Column(Boolean)
wifi.comment = 'Evaluate if wifi connection works correctly' wifi.comment = 'Evaluate if wifi connection works correctly'
bluetooth = Column(Boolean) bluetooth = Column(Boolean)
@ -1007,7 +1006,6 @@ class FinalRate(Rate):
""" """
functionality = relationship(FunctionalityRate, ) functionality = relationship(FunctionalityRate, )
# TODO is necessary?? create a AppearanceRate..
appearance = relationship(TestVisual, ) appearance = relationship(TestVisual, )
final_id = Column(UUID(as_uuid=True), ForeignKey(FinalRate.id)) final_id = Column(UUID(as_uuid=True), ForeignKey(FinalRate.id))

View file

@ -167,6 +167,8 @@ class StressTest(Test):
class TestAudio(Test): class TestAudio(Test):
__doc__ = m.TestAudio.__doc__ __doc__ = m.TestAudio.__doc__
loudspeaker = BDEnum(LoudspeakerRange)
microphone = Boolean()
class TestConnectivity(Test): class TestConnectivity(Test):
@ -177,8 +179,18 @@ class TestBattery(Test):
__doc__ = m.TestBattery.__doc__ __doc__ = m.TestBattery.__doc__
class TestBios:
__doc__ = m.TestBios.__doc__
class TestBiosDifficulty:
__doc__ = m.TestBiosDifficulty.__doc__
class TestVisual(ManualRate): class TestVisual(ManualRate):
__doc__ = m.TestVisual.__doc__ __doc__ = m.TestVisual.__doc__
appearance_range = DBEnum(AppearanceRange)
class Rate(EventWithOneDevice): class Rate(EventWithOneDevice):

View file

@ -1,9 +1,12 @@
import math import math
import pytest
from ereuse_devicehub.resources.device.models import HardDrive, Processor, RamModule, Device from ereuse_devicehub.resources.device.models import HardDrive, Processor, RamModule, Device
from ereuse_devicehub.resources.event.rate.workbench.v2_0 import Rate from ereuse_devicehub.resources.event.rate.workbench.v2_0 import Rate
@pytest.mark.xfail(reason='Evaluate')
def test_ratev2_general(): def test_ratev2_general():
""" """
Test to check if compute all aspects (quality, functionality and appearance) correctly Test to check if compute all aspects (quality, functionality and appearance) correctly
@ -43,31 +46,86 @@ def test_ratev2_general():
assert math.isclose(rate_device, 2.2, rel_tol=0.001) assert math.isclose(rate_device, 2.2, rel_tol=0.001)
@pytest.mark.xfail(reason='Develop')
def test_general_rate_without_quality():
"""
Test to check if compute correctly general rate if quality rate are missing..
Final Rate = Func Rate + App Rate
"""
pass
@pytest.mark.xfail(reason='Develop')
def test_general_rate_without_functionality():
"""
Test to check if compute correctly general rate if functionality rate are missing..
Final Rate = Quality Rate + App Rate
"""
pass
@pytest.mark.xfail(reason='Develop')
def test_general_rate_without_appearance():
"""
Test to check if compute correctly general rate if appearance rate are missing..
Final Rate = Quality Rate + Functionality Rate
"""
pass
@pytest.mark.xfail(reason='Develop')
def test_general_rate_without_quality():
"""
Test to check if compute correctly general rate if quality rate are missing..
Final Rate = Func Rate + App Rate
"""
pass
# QUALITY RATE TEST CODE
@pytest.mark.xfail(reason='Develop')
def test_quality_rate(): def test_quality_rate():
""" Test to check all quality aspects """
""" Quality Rate Test
pass Test to check all quality aspects, we suppose that we have full snapshot with all information and benchmarks
def test_functionality_rate():
"""
Test to check all functionality aspects
:return:
""" """
pass pass
@pytest.mark.xfail(reason='Develop')
def test_component_rate_equal_to_zero(): def test_component_rate_equal_to_zero():
""" """
Test to check all functionality aspects Quality Rate Test
:return: Test to check quality aspects with some fields equal to 0 or null
""" """
pass pass
def tes_component_rate_is_null(): # FUNCTIONALITY RATE TEST DONE
@pytest.mark.xfail(reason='Develop')
def test_functionality_rate():
""" """
Test to check all functionality aspects Functionality Rate Test
:return: Tests to check all aspects of functionality, we assume we have a complete snapshot with all the information and tests performed.a
""" """
pass pass
@pytest.mark.xfail(reason='Develop')
def test_functionality_rate_miss_tests():
"""
Functionality Rate Test
Test to check if functionality rate compute correctly without complete information of test.
"""
@pytest.mark.xfail(reason='Develop')
def test_update_rate_with_manual_rate():
"""
Test to check if compute correctly a new rate of a device, if this device input after a manual rate (like visual test)
Computing a new rate with old snapshot information score and aggregate a new test information score.
"""